<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://projectswiki.eleceng.adelaide.edu.au/projects/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=A1653368</id>
	<title>Projects - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://projectswiki.eleceng.adelaide.edu.au/projects/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=A1653368"/>
	<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php/Special:Contributions/A1653368"/>
	<updated>2026-04-21T20:12:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.4</generator>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2015s1-50_Tracking,_Herding_and_Routing_by_Autonomous_Smart_Cars_(PG)&amp;diff=3842</id>
		<title>Projects:2015s1-50 Tracking, Herding and Routing by Autonomous Smart Cars (PG)</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2015s1-50_Tracking,_Herding_and_Routing_by_Autonomous_Smart_Cars_(PG)&amp;diff=3842"/>
		<updated>2015-10-18T10:13:35Z</updated>

		<summary type="html">&lt;p&gt;A1653368: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The aim of this project is to create a system of autonomous smart cars, which will be able&lt;br /&gt;
to co-exist and move in an area without collision. Arduino robot vehicles will be used as the&lt;br /&gt;
`Smart Cars&amp;#039; due to size and complexity constraints.&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoRobot.jpg|thumb|250px|alt=The robot being used in place of smart cars.|The Arduino Robot]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
===Team Members===&lt;br /&gt;
*Mingnan Wang&lt;br /&gt;
*Ke Cai&lt;br /&gt;
&lt;br /&gt;
===Supervisors===&lt;br /&gt;
*A/Prof Cheng-Chew Lim&lt;br /&gt;
*Prof Peng Shi&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The basic goal is to be able to demonstrate four smart cars interacting in such a way that&lt;br /&gt;
they can create a given formation without colliding with one another. A set of extension goals&lt;br /&gt;
devised that incorporate movement in formation, user-defined formations and expansion for&lt;br /&gt;
larger numbers of vehicles will also be demonstrated if time permits.&lt;br /&gt;
To achieve the proposed environment, two main systems will be created:&lt;br /&gt;
&lt;br /&gt;
1) Movement system&lt;br /&gt;
&lt;br /&gt;
2) Communication system&lt;br /&gt;
&lt;br /&gt;
This project will demonstrate, at a small scale level, a method of which multiple smart&lt;br /&gt;
robots can interact with each other, and move based on those interactions. This is a very&lt;br /&gt;
important principle as it is the basis for being able to create true automation of devices.&lt;br /&gt;
On the other hand, observing this project from the perspective of smart vehicles, it will be&lt;br /&gt;
able to demonstrate a starting point for autonomous transportation. Similar systems already&lt;br /&gt;
exist, however most use much larger, more powerful computers. The system created in this&lt;br /&gt;
project will operate on much less powerful hardware, demonstrating that automation may&lt;br /&gt;
not require extensive and expensive computer systems.&lt;br /&gt;
&lt;br /&gt;
==System Overview==&lt;br /&gt;
The major design challenge will be making the two systems work together to achieve the&lt;br /&gt;
desired result, and the final product is displayed in Figure 1.&lt;br /&gt;
&lt;br /&gt;
[[File:System.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Figure 1: System Overview&lt;br /&gt;
&lt;br /&gt;
==Objectives== &lt;br /&gt;
The project has one main objective, with many further extension objectives devised if time&lt;br /&gt;
permits. The objective is to create the environment where a command can be sent from a&lt;br /&gt;
computer, such as form a line, and from there 4 smart cars will autonomously move to the&lt;br /&gt;
required positions to create the formation without colliding with one another. This requires&lt;br /&gt;
them to be aware of their initial location on the terrain, the initial locations of all other&lt;br /&gt;
smart cars, and the location of all cars whilst in movement. This will require a communica-&lt;br /&gt;
tion system between the computer and each robot to be created, and to integrate with the&lt;br /&gt;
movement system of the smart cars.&lt;br /&gt;
The extension objectives that have been outlined include; Making the smart cars move in&lt;br /&gt;
formation, making the smart cars move into a user-defined formation (via computer appli-&lt;br /&gt;
cation) and allowing the system to be expandable for many more smart cars (up to 10).&lt;br /&gt;
&lt;br /&gt;
== Project Details == &lt;br /&gt;
===The Robot===&lt;br /&gt;
&lt;br /&gt;
To implement the smart cars we will be using an existing Arduino robot that is readily&lt;br /&gt;
available on the market. This makes it easier for us as we wont have to design and construct the hardware of the smart car as this would veer away from&lt;br /&gt;
the scope of our project.&lt;br /&gt;
The Arduino robot platform has the following features:&lt;br /&gt;
&lt;br /&gt;
• ATmega32u4 microprocessor, which has a reasonable amount of computational power&lt;br /&gt;
and on-board memory, which is vital for our calculations.&lt;br /&gt;
&lt;br /&gt;
• Pre built movement system, which includes motors, motor controllers, wheels and&lt;br /&gt;
gearboxes.&lt;br /&gt;
&lt;br /&gt;
• Additional on-board memory space, to allow more code to be stored.&lt;br /&gt;
&lt;br /&gt;
• Compass sensor and multiple extension slots to allow additional sensors to be added.&lt;br /&gt;
&lt;br /&gt;
===Grid/Initial Position System===&lt;br /&gt;
In order for the smart cars to know their current positions without the need to use GPS&lt;br /&gt;
coordinates, we will need to establish a grid system in the operational terrain, which is approximately a 4m by 4m or 5m&lt;br /&gt;
by 5m area. The smart car will then be using a coordinate in the grid system to determine&lt;br /&gt;
their current location.&lt;br /&gt;
&lt;br /&gt;
The process will be to first establish the grid system using a designated boundary set out by&lt;br /&gt;
physical markers, then using the established grid system the initial positions of the smart&lt;br /&gt;
cars can be calculated and communicated to them. This can done in various ways, for this project we will be mainly focusing on image processing.&lt;br /&gt;
&lt;br /&gt;
The image recognition process will be done be using a HD webcam and camera mount so&lt;br /&gt;
that the camera has a view of the entire operational terrain. To establish the grid systems and initial positions we will place coloured markers in four&lt;br /&gt;
corners of the terrain and program the smart cars to display a unique colour on their LCD&lt;br /&gt;
screens, this is so the boundaries and smart cars can be more easily distinguished to the&lt;br /&gt;
image recognition algorithm. The webcam will the take a single HD photo of the terrain&lt;br /&gt;
and send it to the computer control unit.&lt;br /&gt;
&lt;br /&gt;
The computer control unit will then use image recognition algorithm in its existing system&lt;br /&gt;
to first determine the boundaries to create a grid system, then to recognise the smart cars&lt;br /&gt;
and using the grid, determine the initial positions of the smart cars. This information will&lt;br /&gt;
then be sent out to the smart cars using Wi-Fi.&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRecognition.png|ImageRecognition.png||700px]]&lt;br /&gt;
&lt;br /&gt;
Figure 2: Image Processing Technique&lt;br /&gt;
&lt;br /&gt;
===Smart Car Control System===&lt;br /&gt;
The behaviour and movement of the smart car will be determined by the smart car control&lt;br /&gt;
system. Each smart car will use this system independently of the other robots. This system&lt;br /&gt;
consists of three subsystems.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;1. Basic Movement System (BMS)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first subsystem that will need to be implemented is the basic movement system (BMS),&lt;br /&gt;
the BMS handles any physical moment the smart car will need to make, this consists of&lt;br /&gt;
moving in a straight line forwards and backwards, performing a 90 degree turn, performing&lt;br /&gt;
a curved turn and stopping. The Arduino robot already comes pre-programmed with a library to help perform these&lt;br /&gt;
movements; however code will need to be written in conjunction with this library in order&lt;br /&gt;
for the robot perform these given movements provided previously.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;2. Routing System&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The routing system uses behaviour algorithms and additionally data inputs to calculate an&lt;br /&gt;
optimal route for the smart car to take to avoid other smart cars and obstacles. This route&lt;br /&gt;
will then be translated to the BMS which will physically move the smart to along that route.&lt;br /&gt;
The routing system works by first getting a command and coordinate from the computer&lt;br /&gt;
control unit. Knowing its goal the routing system will then give the current location and the real time&lt;br /&gt;
locations of the other smart cars to the behaviour algorithm. The behaviour algorithm will&lt;br /&gt;
then use this information to determine which route to the destination coordinate the smart&lt;br /&gt;
car must take to avoid the other smart cars and any obstacles on the way.&lt;br /&gt;
&lt;br /&gt;
The routing system will be continually monitoring the location of itself and the other smart&lt;br /&gt;
cars around it, if however a smart car gets too close, the routing system will then need to re&lt;br /&gt;
calculate a route to avoid a collision, this may mean waiting for another smart car to pass&lt;br /&gt;
or reversing and changing direction. The appropriate decision will be determined by the&lt;br /&gt;
behaviour algorithm.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;3. Sensory System&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Many of the systems described above rely on the use of various sensors to provide the&lt;br /&gt;
appropriate information to perform a task. The sensory system has two roles the first is to&lt;br /&gt;
provide raw sensor data to various systems and the second is the make calculations of its&lt;br /&gt;
own using the sensors and giving that information to other systems.&lt;br /&gt;
&lt;br /&gt;
The sensory system provides the raw sensor data of the compass, the compass will provide&lt;br /&gt;
the current direction the smart car is facing and this information will be given to the BMS,&lt;br /&gt;
the BMS is reliant on this information so that it can move the smart car in a certain direction&lt;br /&gt;
or make a turn. The sensory system also provides calculated data using various sensors, the main information&lt;br /&gt;
being the current location of the smart car.&lt;br /&gt;
&lt;br /&gt;
===Communication System===&lt;br /&gt;
&lt;br /&gt;
[[File:arduino-wifi-shield.jpg|thumb|300px|Wi-Fi shield for the Arduino Robot]]&lt;br /&gt;
&lt;br /&gt;
The communication system is vital part of the object avoidance system it provides the&lt;br /&gt;
necessary information to be transferred amongst the smart cars and the computer control&lt;br /&gt;
unit. We will be using Wi-Fi as the form of communication we have chosen this for the&lt;br /&gt;
following reasons:&lt;br /&gt;
&lt;br /&gt;
• Wi-Fi shields are relatively cheap and easily adapted on to the Arduino robot platforms;&lt;br /&gt;
they are come with extensive pre-built libraries to assists with programming.&lt;br /&gt;
&lt;br /&gt;
• Wi-Fi provides the ability to broadcast information, this means multiple devices can&lt;br /&gt;
receive the information simultaneously.&lt;br /&gt;
&lt;br /&gt;
• Wi-Fi can be made secure to prevent interference from external sources.&lt;br /&gt;
&lt;br /&gt;
• Wi-Fi shields have an approximate range of 100m indoors which is more than adequate&lt;br /&gt;
for what we require.&lt;br /&gt;
&lt;br /&gt;
There will be two types of communication in the object avoidance systems.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;1. Communication Between Smart Cars&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In order for the routing system to determine the optimal route for the smart car to take,&lt;br /&gt;
it must first know the positions of all the other smart cars in the area. This information is&lt;br /&gt;
found from the communication system. When a smart car moves, the sensory system described previously will determine the new&lt;br /&gt;
position of the smart car, this information will then be broadcasted to all the other smart&lt;br /&gt;
cars in the area using the Wi-Fi communication system. The receiving smart robot will&lt;br /&gt;
be constantly checking for new coordinates on the Wi-Fi communication network, when&lt;br /&gt;
it determines that another smart car has moved it will save its new position in onboard&lt;br /&gt;
memory. Therefore, each smart car will have stored the current position of all the other smart cars&lt;br /&gt;
in the area and will use this information to avoid collisions.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;2. Communication Between Smart Cars and Computer Control Unit&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The computer control unit also plays an important role in the communication network. As&lt;br /&gt;
previously discussed the smart cars will be communicating their positions to each other,&lt;br /&gt;
however they will also be communicating their position to the computer control unit as well,&lt;br /&gt;
by doing this the computer control unit can know where all the smart cars are at all times,&lt;br /&gt;
this has a lot of uses which will be discussed in the next section.&lt;br /&gt;
Additionally, the computer control unit will need to send information to the smart cars&lt;br /&gt;
individually or all at once. This includes issuing commands to the smart cars, giving out&lt;br /&gt;
initial positions in the case of image recognition being used or issuing an emergency stop.&lt;br /&gt;
&lt;br /&gt;
===Computer Control Unit (CCU)===&lt;br /&gt;
&lt;br /&gt;
The computer control unit will act as the central command of the smart cars, its roles&lt;br /&gt;
include:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;1. Issuing Tasks to the Smart Cars&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The CCU program will have a range of predefined requests the smart cars can perform such&lt;br /&gt;
as make a shape formation. When the user picks one of these requests the CCU program will&lt;br /&gt;
first determine the positions each smart car must go to, next it sends out this information&lt;br /&gt;
plus a status of the task to all the smart cars. For example go to this position and create a&lt;br /&gt;
square formation.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;2. Up To Date View of the Grid&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The CCU will also keep an up to date map showing the current positions of all the smart&lt;br /&gt;
cars in the grid, this information helps the CCU determine the positions the smart cars must&lt;br /&gt;
go to, to perform a task.&lt;br /&gt;
Additionally, other than to give the user a graphical representation of where the smart cars&lt;br /&gt;
are on the grid, there will be another map that the user can interact with. This map will&lt;br /&gt;
initially show robot markers corresponding to their current locations. The user will then be&lt;br /&gt;
able to drag and drop these markers on the map, which will then make the actual robot&lt;br /&gt;
move to that position in the grid. By doing this, user will be able to create custom routes&lt;br /&gt;
for the robots apart from the pre-defined formations.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;3. Emergency Stop&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To encourage the safety of the project we will have an emergency stop command on the&lt;br /&gt;
CCU, if the user initiates this command, the CCU will issue an emergency stop to all the&lt;br /&gt;
smart cars regardless of there current positions or movements. This is to ensure if an error&lt;br /&gt;
was to occur there was minimal damage to the systems.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2015s1-50_Tracking,_Herding_and_Routing_by_Autonomous_Smart_Cars_(PG)&amp;diff=3841</id>
		<title>Projects:2015s1-50 Tracking, Herding and Routing by Autonomous Smart Cars (PG)</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2015s1-50_Tracking,_Herding_and_Routing_by_Autonomous_Smart_Cars_(PG)&amp;diff=3841"/>
		<updated>2015-10-18T10:12:49Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Team Members */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The aim of this project is to create a system of autonomous smart cars, which will be able&lt;br /&gt;
to co-exist and move in an area without collision. Arduino robot vehicles will be used as the&lt;br /&gt;
`Smart Cars&amp;#039; due to size and complexity constraints.&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoRobot.jpg|thumb|250px|alt=The robot being used in place of smart cars.|The Arduino Robot]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
===Team Members===&lt;br /&gt;
*Mingnan Wang 123&lt;br /&gt;
*Ke Cai&lt;br /&gt;
&lt;br /&gt;
===Supervisors===&lt;br /&gt;
*A/Prof Cheng-Chew Lim&lt;br /&gt;
*Prof Peng Shi&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The basic goal is to be able to demonstrate four smart cars interacting in such a way that&lt;br /&gt;
they can create a given formation without colliding with one another. A set of extension goals&lt;br /&gt;
devised that incorporate movement in formation, user-defined formations and expansion for&lt;br /&gt;
larger numbers of vehicles will also be demonstrated if time permits.&lt;br /&gt;
To achieve the proposed environment, two main systems will be created:&lt;br /&gt;
&lt;br /&gt;
1) Movement system&lt;br /&gt;
&lt;br /&gt;
2) Communication system&lt;br /&gt;
&lt;br /&gt;
This project will demonstrate, at a small scale level, a method of which multiple smart&lt;br /&gt;
robots can interact with each other, and move based on those interactions. This is a very&lt;br /&gt;
important principle as it is the basis for being able to create true automation of devices.&lt;br /&gt;
On the other hand, observing this project from the perspective of smart vehicles, it will be&lt;br /&gt;
able to demonstrate a starting point for autonomous transportation. Similar systems already&lt;br /&gt;
exist, however most use much larger, more powerful computers. The system created in this&lt;br /&gt;
project will operate on much less powerful hardware, demonstrating that automation may&lt;br /&gt;
not require extensive and expensive computer systems.&lt;br /&gt;
&lt;br /&gt;
==System Overview==&lt;br /&gt;
The major design challenge will be making the two systems work together to achieve the&lt;br /&gt;
desired result, and the final product is displayed in Figure 1.&lt;br /&gt;
&lt;br /&gt;
[[File:System.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Figure 1: System Overview&lt;br /&gt;
&lt;br /&gt;
==Objectives== &lt;br /&gt;
The project has one main objective, with many further extension objectives devised if time&lt;br /&gt;
permits. The objective is to create the environment where a command can be sent from a&lt;br /&gt;
computer, such as form a line, and from there 4 smart cars will autonomously move to the&lt;br /&gt;
required positions to create the formation without colliding with one another. This requires&lt;br /&gt;
them to be aware of their initial location on the terrain, the initial locations of all other&lt;br /&gt;
smart cars, and the location of all cars whilst in movement. This will require a communica-&lt;br /&gt;
tion system between the computer and each robot to be created, and to integrate with the&lt;br /&gt;
movement system of the smart cars.&lt;br /&gt;
The extension objectives that have been outlined include; Making the smart cars move in&lt;br /&gt;
formation, making the smart cars move into a user-defined formation (via computer appli-&lt;br /&gt;
cation) and allowing the system to be expandable for many more smart cars (up to 10).&lt;br /&gt;
&lt;br /&gt;
== Project Details == &lt;br /&gt;
===The Robot===&lt;br /&gt;
&lt;br /&gt;
To implement the smart cars we will be using an existing Arduino robot that is readily&lt;br /&gt;
available on the market. This makes it easier for us as we wont have to design and construct the hardware of the smart car as this would veer away from&lt;br /&gt;
the scope of our project.&lt;br /&gt;
The Arduino robot platform has the following features:&lt;br /&gt;
&lt;br /&gt;
• ATmega32u4 microprocessor, which has a reasonable amount of computational power&lt;br /&gt;
and on-board memory, which is vital for our calculations.&lt;br /&gt;
&lt;br /&gt;
• Pre built movement system, which includes motors, motor controllers, wheels and&lt;br /&gt;
gearboxes.&lt;br /&gt;
&lt;br /&gt;
• Additional on-board memory space, to allow more code to be stored.&lt;br /&gt;
&lt;br /&gt;
• Compass sensor and multiple extension slots to allow additional sensors to be added.&lt;br /&gt;
&lt;br /&gt;
===Grid/Initial Position System===&lt;br /&gt;
In order for the smart cars to know their current positions without the need to use GPS&lt;br /&gt;
coordinates, we will need to establish a grid system in the operational terrain, which is approximately a 4m by 4m or 5m&lt;br /&gt;
by 5m area. The smart car will then be using a coordinate in the grid system to determine&lt;br /&gt;
their current location.&lt;br /&gt;
&lt;br /&gt;
The process will be to first establish the grid system using a designated boundary set out by&lt;br /&gt;
physical markers, then using the established grid system the initial positions of the smart&lt;br /&gt;
cars can be calculated and communicated to them. This can done in various ways, for this project we will be mainly focusing on image processing.&lt;br /&gt;
&lt;br /&gt;
The image recognition process will be done be using a HD webcam and camera mount so&lt;br /&gt;
that the camera has a view of the entire operational terrain. To establish the grid systems and initial positions we will place coloured markers in four&lt;br /&gt;
corners of the terrain and program the smart cars to display a unique colour on their LCD&lt;br /&gt;
screens, this is so the boundaries and smart cars can be more easily distinguished to the&lt;br /&gt;
image recognition algorithm. The webcam will the take a single HD photo of the terrain&lt;br /&gt;
and send it to the computer control unit.&lt;br /&gt;
&lt;br /&gt;
The computer control unit will then use image recognition algorithm in its existing system&lt;br /&gt;
to first determine the boundaries to create a grid system, then to recognise the smart cars&lt;br /&gt;
and using the grid, determine the initial positions of the smart cars. This information will&lt;br /&gt;
then be sent out to the smart cars using Wi-Fi.&lt;br /&gt;
&lt;br /&gt;
[[File:ImageRecognition.png|ImageRecognition.png||700px]]&lt;br /&gt;
&lt;br /&gt;
Figure 2: Image Processing Technique&lt;br /&gt;
&lt;br /&gt;
===Smart Car Control System===&lt;br /&gt;
The behaviour and movement of the smart car will be determined by the smart car control&lt;br /&gt;
system. Each smart car will use this system independently of the other robots. This system&lt;br /&gt;
consists of three subsystems.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;1. Basic Movement System (BMS)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first subsystem that will need to be implemented is the basic movement system (BMS),&lt;br /&gt;
the BMS handles any physical moment the smart car will need to make, this consists of&lt;br /&gt;
moving in a straight line forwards and backwards, performing a 90 degree turn, performing&lt;br /&gt;
a curved turn and stopping. The Arduino robot already comes pre-programmed with a library to help perform these&lt;br /&gt;
movements; however code will need to be written in conjunction with this library in order&lt;br /&gt;
for the robot perform these given movements provided previously.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;2. Routing System&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The routing system uses behaviour algorithms and additionally data inputs to calculate an&lt;br /&gt;
optimal route for the smart car to take to avoid other smart cars and obstacles. This route&lt;br /&gt;
will then be translated to the BMS which will physically move the smart to along that route.&lt;br /&gt;
The routing system works by first getting a command and coordinate from the computer&lt;br /&gt;
control unit. Knowing its goal the routing system will then give the current location and the real time&lt;br /&gt;
locations of the other smart cars to the behaviour algorithm. The behaviour algorithm will&lt;br /&gt;
then use this information to determine which route to the destination coordinate the smart&lt;br /&gt;
car must take to avoid the other smart cars and any obstacles on the way.&lt;br /&gt;
&lt;br /&gt;
The routing system will be continually monitoring the location of itself and the other smart&lt;br /&gt;
cars around it, if however a smart car gets too close, the routing system will then need to re&lt;br /&gt;
calculate a route to avoid a collision, this may mean waiting for another smart car to pass&lt;br /&gt;
or reversing and changing direction. The appropriate decision will be determined by the&lt;br /&gt;
behaviour algorithm.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;3. Sensory System&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Many of the systems described above rely on the use of various sensors to provide the&lt;br /&gt;
appropriate information to perform a task. The sensory system has two roles the first is to&lt;br /&gt;
provide raw sensor data to various systems and the second is the make calculations of its&lt;br /&gt;
own using the sensors and giving that information to other systems.&lt;br /&gt;
&lt;br /&gt;
The sensory system provides the raw sensor data of the compass, the compass will provide&lt;br /&gt;
the current direction the smart car is facing and this information will be given to the BMS,&lt;br /&gt;
the BMS is reliant on this information so that it can move the smart car in a certain direction&lt;br /&gt;
or make a turn. The sensory system also provides calculated data using various sensors, the main information&lt;br /&gt;
being the current location of the smart car.&lt;br /&gt;
&lt;br /&gt;
===Communication System===&lt;br /&gt;
&lt;br /&gt;
[[File:arduino-wifi-shield.jpg|thumb|300px|Wi-Fi shield for the Arduino Robot]]&lt;br /&gt;
&lt;br /&gt;
The communication system is vital part of the object avoidance system it provides the&lt;br /&gt;
necessary information to be transferred amongst the smart cars and the computer control&lt;br /&gt;
unit. We will be using Wi-Fi as the form of communication we have chosen this for the&lt;br /&gt;
following reasons:&lt;br /&gt;
&lt;br /&gt;
• Wi-Fi shields are relatively cheap and easily adapted on to the Arduino robot platforms;&lt;br /&gt;
they are come with extensive pre-built libraries to assists with programming.&lt;br /&gt;
&lt;br /&gt;
• Wi-Fi provides the ability to broadcast information, this means multiple devices can&lt;br /&gt;
receive the information simultaneously.&lt;br /&gt;
&lt;br /&gt;
• Wi-Fi can be made secure to prevent interference from external sources.&lt;br /&gt;
&lt;br /&gt;
• Wi-Fi shields have an approximate range of 100m indoors which is more than adequate&lt;br /&gt;
for what we require.&lt;br /&gt;
&lt;br /&gt;
There will be two types of communication in the object avoidance systems.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;1. Communication Between Smart Cars&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In order for the routing system to determine the optimal route for the smart car to take,&lt;br /&gt;
it must first know the positions of all the other smart cars in the area. This information is&lt;br /&gt;
found from the communication system. When a smart car moves, the sensory system described previously will determine the new&lt;br /&gt;
position of the smart car, this information will then be broadcasted to all the other smart&lt;br /&gt;
cars in the area using the Wi-Fi communication system. The receiving smart robot will&lt;br /&gt;
be constantly checking for new coordinates on the Wi-Fi communication network, when&lt;br /&gt;
it determines that another smart car has moved it will save its new position in onboard&lt;br /&gt;
memory. Therefore, each smart car will have stored the current position of all the other smart cars&lt;br /&gt;
in the area and will use this information to avoid collisions.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;2. Communication Between Smart Cars and Computer Control Unit&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The computer control unit also plays an important role in the communication network. As&lt;br /&gt;
previously discussed the smart cars will be communicating their positions to each other,&lt;br /&gt;
however they will also be communicating their position to the computer control unit as well,&lt;br /&gt;
by doing this the computer control unit can know where all the smart cars are at all times,&lt;br /&gt;
this has a lot of uses which will be discussed in the next section.&lt;br /&gt;
Additionally, the computer control unit will need to send information to the smart cars&lt;br /&gt;
individually or all at once. This includes issuing commands to the smart cars, giving out&lt;br /&gt;
initial positions in the case of image recognition being used or issuing an emergency stop.&lt;br /&gt;
&lt;br /&gt;
===Computer Control Unit (CCU)===&lt;br /&gt;
&lt;br /&gt;
The computer control unit will act as the central command of the smart cars, its roles&lt;br /&gt;
include:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;1. Issuing Tasks to the Smart Cars&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The CCU program will have a range of predefined requests the smart cars can perform such&lt;br /&gt;
as make a shape formation. When the user picks one of these requests the CCU program will&lt;br /&gt;
first determine the positions each smart car must go to, next it sends out this information&lt;br /&gt;
plus a status of the task to all the smart cars. For example go to this position and create a&lt;br /&gt;
square formation.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;2. Up To Date View of the Grid&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The CCU will also keep an up to date map showing the current positions of all the smart&lt;br /&gt;
cars in the grid, this information helps the CCU determine the positions the smart cars must&lt;br /&gt;
go to, to perform a task.&lt;br /&gt;
Additionally, other than to give the user a graphical representation of where the smart cars&lt;br /&gt;
are on the grid, there will be another map that the user can interact with. This map will&lt;br /&gt;
initially show robot markers corresponding to their current locations. The user will then be&lt;br /&gt;
able to drag and drop these markers on the map, which will then make the actual robot&lt;br /&gt;
move to that position in the grid. By doing this, user will be able to create custom routes&lt;br /&gt;
for the robots apart from the pre-defined formations.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;3. Emergency Stop&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To encourage the safety of the project we will have an emergency stop command on the&lt;br /&gt;
CCU, if the user initiates this command, the CCU will issue an emergency stop to all the&lt;br /&gt;
smart cars regardless of there current positions or movements. This is to ensure if an error&lt;br /&gt;
was to occur there was minimal damage to the systems.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2445</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2445"/>
		<updated>2015-06-02T09:04:20Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Fuzzy rules define */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|400px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|450px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|450px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is NS and the variation of the angular error is NL, then the trolley acceleration Γ is LB.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 18, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 18. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 19 to Figure 21 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 22 and Figure 23. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 2, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 19.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 20.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 21.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 22.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 23.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 24.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure 24.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
=== Future work ===&lt;br /&gt;
Gantry crane controlling is a large research area in control field. There still exists lot of work could be done.&lt;br /&gt;
&lt;br /&gt;
The model used in this project to simulation is lumped mass model, in which the mass of the rod is neglect, but for practical device the connector is 0.5 kilo grams, which is the same weight as trolley. A distributed mass model could be studied in future.&lt;br /&gt;
&lt;br /&gt;
There are other controllers that could research on. For instance, adaptive control is a method that widely applied in modern industrial, especially for changing conditions case. Fuzzy-tuned PID control is another type of hybrid controller, also there is an algorithm called particle swarm optimizations could help increase system controlling precision.&lt;br /&gt;
&lt;br /&gt;
The practical model in lab is built together, hard to separate. In future could use a variable mass of payload and an extension-type of connector, which are more close to the actual application.&lt;br /&gt;
&lt;br /&gt;
The model now is a planar model, but in real world the payload is mostly moving in a 3 dimension space. In future the system model could increase the dimension, which could coordinate with different payload shape or transport line.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2444</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2444"/>
		<updated>2015-06-02T09:00:44Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Outer-loop controller design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|400px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|450px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|450px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 18, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 18. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 19 to Figure 21 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 22 and Figure 23. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 2, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 19.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 20.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 21.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 22.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 23.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 24.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure 24.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
=== Future work ===&lt;br /&gt;
Gantry crane controlling is a large research area in control field. There still exists lot of work could be done.&lt;br /&gt;
&lt;br /&gt;
The model used in this project to simulation is lumped mass model, in which the mass of the rod is neglect, but for practical device the connector is 0.5 kilo grams, which is the same weight as trolley. A distributed mass model could be studied in future.&lt;br /&gt;
&lt;br /&gt;
There are other controllers that could research on. For instance, adaptive control is a method that widely applied in modern industrial, especially for changing conditions case. Fuzzy-tuned PID control is another type of hybrid controller, also there is an algorithm called particle swarm optimizations could help increase system controlling precision.&lt;br /&gt;
&lt;br /&gt;
The practical model in lab is built together, hard to separate. In future could use a variable mass of payload and an extension-type of connector, which are more close to the actual application.&lt;br /&gt;
&lt;br /&gt;
The model now is a planar model, but in real world the payload is mostly moving in a 3 dimension space. In future the system model could increase the dimension, which could coordinate with different payload shape or transport line.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2443</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2443"/>
		<updated>2015-06-02T08:59:52Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Simple pendulum model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|400px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|500px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|500px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 18, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 18. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 19 to Figure 21 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 22 and Figure 23. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 2, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 19.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 20.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 21.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 22.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 23.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 24.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure 24.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
=== Future work ===&lt;br /&gt;
Gantry crane controlling is a large research area in control field. There still exists lot of work could be done.&lt;br /&gt;
&lt;br /&gt;
The model used in this project to simulation is lumped mass model, in which the mass of the rod is neglect, but for practical device the connector is 0.5 kilo grams, which is the same weight as trolley. A distributed mass model could be studied in future.&lt;br /&gt;
&lt;br /&gt;
There are other controllers that could research on. For instance, adaptive control is a method that widely applied in modern industrial, especially for changing conditions case. Fuzzy-tuned PID control is another type of hybrid controller, also there is an algorithm called particle swarm optimizations could help increase system controlling precision.&lt;br /&gt;
&lt;br /&gt;
The practical model in lab is built together, hard to separate. In future could use a variable mass of payload and an extension-type of connector, which are more close to the actual application.&lt;br /&gt;
&lt;br /&gt;
The model now is a planar model, but in real world the payload is mostly moving in a 3 dimension space. In future the system model could increase the dimension, which could coordinate with different payload shape or transport line.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2442</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2442"/>
		<updated>2015-06-02T08:57:38Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Outer-loop controller design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|500px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|500px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 18, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 18. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 19 to Figure 21 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 22 and Figure 23. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 2, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 19.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 20.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 21.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 22.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 23.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 24.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure 24.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
=== Future work ===&lt;br /&gt;
Gantry crane controlling is a large research area in control field. There still exists lot of work could be done.&lt;br /&gt;
&lt;br /&gt;
The model used in this project to simulation is lumped mass model, in which the mass of the rod is neglect, but for practical device the connector is 0.5 kilo grams, which is the same weight as trolley. A distributed mass model could be studied in future.&lt;br /&gt;
&lt;br /&gt;
There are other controllers that could research on. For instance, adaptive control is a method that widely applied in modern industrial, especially for changing conditions case. Fuzzy-tuned PID control is another type of hybrid controller, also there is an algorithm called particle swarm optimizations could help increase system controlling precision.&lt;br /&gt;
&lt;br /&gt;
The practical model in lab is built together, hard to separate. In future could use a variable mass of payload and an extension-type of connector, which are more close to the actual application.&lt;br /&gt;
&lt;br /&gt;
The model now is a planar model, but in real world the payload is mostly moving in a 3 dimension space. In future the system model could increase the dimension, which could coordinate with different payload shape or transport line.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2255</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2255"/>
		<updated>2015-05-29T04:27:43Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Future work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 18, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 18. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 19 to Figure 21 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 22 and Figure 23. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 2, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 19.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 20.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 21.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 22.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 23.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 24.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure 24.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
=== Future work ===&lt;br /&gt;
Gantry crane controlling is a large research area in control field. There still exists lot of work could be done.&lt;br /&gt;
&lt;br /&gt;
The model used in this project to simulation is lumped mass model, in which the mass of the rod is neglect, but for practical device the connector is 0.5 kilo grams, which is the same weight as trolley. A distributed mass model could be studied in future.&lt;br /&gt;
&lt;br /&gt;
There are other controllers that could research on. For instance, adaptive control is a method that widely applied in modern industrial, especially for changing conditions case. Fuzzy-tuned PID control is another type of hybrid controller, also there is an algorithm called particle swarm optimizations could help increase system controlling precision.&lt;br /&gt;
&lt;br /&gt;
The practical model in lab is built together, hard to separate. In future could use a variable mass of payload and an extension-type of connector, which are more close to the actual application.&lt;br /&gt;
&lt;br /&gt;
The model now is a planar model, but in real world the payload is mostly moving in a 3 dimension space. In future the system model could increase the dimension, which could coordinate with different payload shape or transport line.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2254</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2254"/>
		<updated>2015-05-29T04:27:21Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 18, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 18. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 19 to Figure 21 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 22 and Figure 23. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 2, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 19.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 20.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 21.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 22.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 23.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 24.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure 24.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
=== Future work ===&lt;br /&gt;
Gantry crane controlling is a large research area in control field. There still exists lot of work could be done.&lt;br /&gt;
The model used in this project to simulation is lumped mass model, in which the mass of the rod is neglect, but for practical device the connector is 0.5 kilo grams, which is the same weight as trolley. A distributed mass model could be studied in future.&lt;br /&gt;
There are other controllers that could research on. For instance, adaptive control is a method that widely applied in modern industrial, especially for changing conditions case. Fuzzy-tuned PID control is another type of hybrid controller, also there is an algorithm called particle swarm optimizations could help increase system controlling precision.&lt;br /&gt;
The practical model in lab is built together, hard to separate. In future could use a variable mass of payload and an extension-type of connector, which are more close to the actual application.&lt;br /&gt;
The model now is a planar model, but in real world the payload is mostly moving in a 3 dimension space. In future the system model could increase the dimension, which could coordinate with different payload shape or transport line.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2253</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2253"/>
		<updated>2015-05-29T04:26:25Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 18, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 18. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 19 to Figure 21 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 22 and Figure 23. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 2, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 19.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 20.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 21.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 22.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 23.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 24.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure 24.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2252</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2252"/>
		<updated>2015-05-29T04:25:41Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Results comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 18, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 18. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 19 to Figure 21 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 22 and Figure 23. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 2, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 19.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 20.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 21.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 22.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 23.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2251</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2251"/>
		<updated>2015-05-29T04:24:46Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Results comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 18, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 18. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 19.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 20.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 21.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 22.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 23.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2250</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2250"/>
		<updated>2015-05-29T04:24:17Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Hardware test and interfacing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 18, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 18. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2249</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2249"/>
		<updated>2015-05-29T04:23:55Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Position manual control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 15, which is amplify and adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 16 and Figure 17. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 15.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 16.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 17.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2248</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2248"/>
		<updated>2015-05-29T04:22:29Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Fuzzy rules define */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 14.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2247</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2247"/>
		<updated>2015-05-29T04:21:58Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Fuzzy-logic control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 12 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 12.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 13.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 13.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2246</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2246"/>
		<updated>2015-05-29T04:21:19Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Outer-loop controller design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 10. The tuning Bode diagram is shown as Figure 11.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2245</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2245"/>
		<updated>2015-05-29T04:21:00Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Outer-loop controller design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 10.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 11.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2244</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2244"/>
		<updated>2015-05-29T04:20:43Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* PID control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 9.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2243</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2243"/>
		<updated>2015-05-29T04:20:28Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* System equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 8. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2242</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2242"/>
		<updated>2015-05-29T04:20:02Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Simple pendulum model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 7.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2241</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2241"/>
		<updated>2015-05-29T04:18:00Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Project completion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2240</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2240"/>
		<updated>2015-05-29T04:17:48Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Project completion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2239</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2239"/>
		<updated>2015-05-29T04:17:35Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Project completion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, &lt;br /&gt;
and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2238</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2238"/>
		<updated>2015-05-29T04:17:08Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Project completion ===&lt;br /&gt;
Generally the project is completed and reached the aims and requirements in proposal.&lt;br /&gt;
At this stage, the project achievements are as following aspects:&lt;br /&gt;
•Nonlinear and linear system model are derivate and successful simulated.&lt;br /&gt;
•According to the feedback, the system instantaneous energy is calculated and presented.&lt;br /&gt;
•A timer function with system “fully stooped” criteria is constructed in Simulink.&lt;br /&gt;
•In PID controller designing, the robustness is designed through sensitivity, and then the theoretical parameter variance is length 10% and load 10%.&lt;br /&gt;
•3 different controller methods are developed: PID, fuzzy-logic and hybrid PD-type fuzzy logic.&lt;br /&gt;
•The system performance is determined mainly through settling time, thus the best result is achieved by PID controlling. Last year group’s best result is 4.6 seconds, and this year is 3.2 seconds, which is 30% percent improvement.&lt;br /&gt;
•The demonstration ability is also enhanced since the position manual control is designed instead of current control.&lt;br /&gt;
•Visualize animation programs are developed to demonstrate the system results.&lt;br /&gt;
•System emergency break is realized in simulation, contrast with physical break of last year group.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2237</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2237"/>
		<updated>2015-05-28T14:29:33Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Results comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2236</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2236"/>
		<updated>2015-05-28T14:28:41Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Results comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control reference &amp;amp; practical.gif|center|300px|PID control reference &amp;amp; practical]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD-type fuzzy control reference &amp;amp; practical.gif|center|300px|PD-type fuzzy control reference &amp;amp; practical]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:PID_control_reference_%26_practical.gif&amp;diff=2235</id>
		<title>File:PID control reference &amp; practical.gif</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:PID_control_reference_%26_practical.gif&amp;diff=2235"/>
		<updated>2015-05-28T14:25:33Z</updated>

		<summary type="html">&lt;p&gt;A1653368: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:PD-type_fuzzy_control_reference_%26_practical.gif&amp;diff=2234</id>
		<title>File:PD-type fuzzy control reference &amp; practical.gif</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:PD-type_fuzzy_control_reference_%26_practical.gif&amp;diff=2234"/>
		<updated>2015-05-28T14:25:16Z</updated>

		<summary type="html">&lt;p&gt;A1653368: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2233</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2233"/>
		<updated>2015-05-28T14:22:20Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Results comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 16 to Figure 18 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2232</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2232"/>
		<updated>2015-05-28T14:20:35Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Designing summarize */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2231</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2231"/>
		<updated>2015-05-28T14:20:21Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Designing summarize */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|right|500px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2230</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2230"/>
		<updated>2015-05-28T14:20:05Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Designing summarize */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
[[File:Solving engineering problem cycle.png|thumb|center|300px|Figure 20.Solving engineering problem cycle]]&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:Solving_engineering_problem_cycle.png&amp;diff=2229</id>
		<title>File:Solving engineering problem cycle.png</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:Solving_engineering_problem_cycle.png&amp;diff=2229"/>
		<updated>2015-05-28T14:19:00Z</updated>

		<summary type="html">&lt;p&gt;A1653368: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2228</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2228"/>
		<updated>2015-05-28T14:18:42Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
=== Designing summarize ===&lt;br /&gt;
During the modeling process, the system parameters and assumptions are proofed to important, since one parameters could change the system performance totally different, and the assumptions should be made appropriately. The friction in this project is significant large compared with motor traction, thus friction implement is enssential, and cannot be ignored. In interfacing part, initially the system was built up without testing, as a consequence, the system behaves non-expected. For instance, the motor drives the trolley very fast for every time, it is hard to select a suitable current input only rely on experience. Also, the system model verification process is necessary, since the model reflects understanding from the designer, and it could help checking the accuracy of parameters.&lt;br /&gt;
An appropriate designing process with logical order that learned from this project is as Figure X.&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2227</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2227"/>
		<updated>2015-05-28T14:16:28Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Technical introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2226</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2226"/>
		<updated>2015-05-28T14:15:54Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Technical introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System structure flow.jpg|thumb|left|500px|Figure 2.System structure flow]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2225</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2225"/>
		<updated>2015-05-28T14:15:28Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Technical introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System structure flow.jpg|thumb|left|300px|Figure 2.System structure flow]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:System_structure_flow.jpg&amp;diff=2224</id>
		<title>File:System structure flow.jpg</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:System_structure_flow.jpg&amp;diff=2224"/>
		<updated>2015-05-28T14:14:07Z</updated>

		<summary type="html">&lt;p&gt;A1653368: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2223</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2223"/>
		<updated>2015-05-28T14:08:34Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Position manual control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2222</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2222"/>
		<updated>2015-05-28T14:08:08Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Position manual control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|300px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|300px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2221</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2221"/>
		<updated>2015-05-28T14:00:27Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Position manual control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|center|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|350px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|350px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2220</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2220"/>
		<updated>2015-05-28T14:00:05Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Position manual control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
[[File:Position manual control block diagram.png|thumb|left|350px|Figure 4.Position manual control block diagram]]&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|350px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|350px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2219</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2219"/>
		<updated>2015-05-28T13:59:08Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Position manual control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current before compensation.png|thumb|left|450px|Figure 5.Position manual control input current before compensation]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position manual control input current after compensation.png|thumb|left|450px|Figure 6.Position manual control input current after compensation.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:Position_manual_control_input_current_after_compensation.png&amp;diff=2218</id>
		<title>File:Position manual control input current after compensation.png</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:Position_manual_control_input_current_after_compensation.png&amp;diff=2218"/>
		<updated>2015-05-28T13:56:54Z</updated>

		<summary type="html">&lt;p&gt;A1653368: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:Position_manual_control_input_current_before_compensation.png&amp;diff=2217</id>
		<title>File:Position manual control input current before compensation.png</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:Position_manual_control_input_current_before_compensation.png&amp;diff=2217"/>
		<updated>2015-05-28T13:56:45Z</updated>

		<summary type="html">&lt;p&gt;A1653368: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:Position_manual_control_block_diagram.png&amp;diff=2216</id>
		<title>File:Position manual control block diagram.png</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=File:Position_manual_control_block_diagram.png&amp;diff=2216"/>
		<updated>2015-05-28T13:56:33Z</updated>

		<summary type="html">&lt;p&gt;A1653368: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2215</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2215"/>
		<updated>2015-05-28T13:48:39Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Results comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|430px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|450px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|900px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2214</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2214"/>
		<updated>2015-05-28T13:43:46Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Position manual control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
To achieve the interactive demonstration purpose, a position manual control system is designed. This system is aim at synchronous moving the trolley according to user’s operation through a slider in ControlDesk.&lt;br /&gt;
The minimum current to drive the motor is tested around 1.2A, thus to make the trolley motion more accurate compared with slider position, an extra current with the value of  1.2A is added to the output, shown as Figure 32, which is could the amplify adjust part.&lt;br /&gt;
&lt;br /&gt;
The function of above part could be explained by Figure 33. Before amplify the current, trolley does not move much, after adjusting with friction implement, the trolley will move as expected.&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|530px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|550px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|800px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2213</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2213"/>
		<updated>2015-05-28T13:41:59Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Results comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|530px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|left|550px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|center|800px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
	<entry>
		<id>https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2212</id>
		<title>Projects:2014s2-80 Swinging Crane Project</title>
		<link rel="alternate" type="text/html" href="https://projectswiki.eleceng.adelaide.edu.au/projects/index.php?title=Projects:2014s2-80_Swinging_Crane_Project&amp;diff=2212"/>
		<updated>2015-05-28T13:41:07Z</updated>

		<summary type="html">&lt;p&gt;A1653368: /* Results comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:worst case example.gif|right]]&lt;br /&gt;
[[File:worst case example 2.gif|right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project aim:&amp;#039;&amp;#039;&amp;#039; Swinging Crane project is aim to transporting a payload from one place to another and reducing the consuming time as much as possible. Using the software of Simulink and ControlDesk on computer to create and simulate a system model. Through the hardware of dSPACE board, amplifier and simulator to realise practical control, which is move the trolley for 0.5 meters and count the consuming time from starting movement to fully settled. The outcomes are supposed to realize multiple control methods, which includes automatic and manual control. The system performance should be improved compared with last year results. This project also could be used for helping high school student to understand the principle of control systems.&lt;br /&gt;
== Project introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Technical introduction ===&lt;br /&gt;
[[File:Gantry_Crane_System.png|thumb|500px|Figure 1.Gantry crane system model]]&lt;br /&gt;
&lt;br /&gt;
Gantry cranes are wildly used in industry, for lifting heavy objects by a hoist which is fitted in a hoist trolley and can move horizontally on a rail or pair of rails fitted under a beam.&lt;br /&gt;
&lt;br /&gt;
There are two examples on the above shows 2 worst case in controlling the system. First example uses a large force applied on the trolley, leads the residual swinging angle at the end is very large and the system cost much time to settle. Second example uses small force to drive the trolley from start, but the trolley movement is too slow, which costs a lot of time either. In this project, we will concentrate on designing appropriate feed forward input to the system, and add controllers to help control the system motion, further improve the system performance.&lt;br /&gt;
&lt;br /&gt;
Figure 1 demonstrates the model of swinging crane, the DC motor controls the trolley to horizontally move a load in a short distance. There are two encoders to record the data, one is the moving distance, and another is sway angle of the load. By giving a signal from operation control system, it will generate a DC current from a current source, then injecting it into a motor, which would drive the conveyor belt. There is a trolley placed on one side of the belt, and start moving towards another side. At the bottom of the trolley, using a rod stand for the hoist, connect with a load. At the start of transporting the loads, it will cause accelerated, corresponds to a traction force, effect on the trolley. There occur an angle between the rod and vertical. After the trolley stops, the loads may turn to oscillate. If the initial angle large, the oscillation duration roses, which is a potential risk to the people on the ground.&lt;br /&gt;
&lt;br /&gt;
The system is operated inside a flow, shown as Figure 2. Input signal is generated from Simulink, goes into the plant through dSPACE and amplifier. The outputs of the plant are measured by two encoders, and send back to dSPACE, finally transfer to the computer. The dSPACE and amplifier components will introduce later. The plant is the real model of the system, the transfer relationship is shown in Figure 3. The current flows into DC motor, which drives the belt on the grid. The trolley is bind on the belt, thus it has the same acceleration with the belt. There are two outputs from the, the trolley position and the swinging angle of the pendulum.&lt;br /&gt;
&lt;br /&gt;
=== Motivation ===&lt;br /&gt;
&lt;br /&gt;
[[File:System_structure_flow_chart.png|400px|thumb|right|Figure 2.System structure flow]][[File:Plant_structure_flow_chart.png|400px|thumb|right|Figure 3.Plant structure flow]]&lt;br /&gt;
&lt;br /&gt;
The gantry crane system could be identified into separate sections: linear motion and swinging pendulum. The goal is to minimum the time used to transport loads and reduce the swinging oscillation as minimize as possible.&lt;br /&gt;
The pendulum was studied by Galileo, Huygens, Newton, Hooke and all the leading figures of 17th-century science. Since the long history on the study, pendulum theory has been almost perfect, but still exist imperfection in applied to practical. In this project, the basic model is simple gravity pendulum. To analyse the motion parameters of pendulum, Newton’s classical mechanics Laws are applied. In traditional education, Newton’s lows are taught in high-school physics lecture. The theorem is abstract to student, and divorced from the practical application. The gantry crane system is a representative application, and easy to understand, thus it is suitable for demonstration teaching purpose.&lt;br /&gt;
&lt;br /&gt;
=== Objectives ===&lt;br /&gt;
The aim of swinging crane project is to demonstrate research component of project, examine and improve last year’s project, perform analysis, show understanding of theoretical principles, simulations and experiments, then improve system robustness, calculating instantaneous energy and optimize system motion trajectories. The 5 objectives of this project are shown as bellow:&lt;br /&gt;
&lt;br /&gt;
1.Modelling of system – physical principles, approximates which can be used to simplify model (e.g. linearized model).&lt;br /&gt;
&lt;br /&gt;
2.Selection of reference trajectories-trade-offs, constraints, optimization.&lt;br /&gt;
&lt;br /&gt;
3.Calculation and control of “energy” stored in pendulum-means for damping energy.&lt;br /&gt;
&lt;br /&gt;
4.Simulation of system- investigates and checks performance.&lt;br /&gt;
&lt;br /&gt;
5.Experimental demonstration- interfacing operation, model verification.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Crane system ===&lt;br /&gt;
The crane system model can be dismantled into 2 parts: a pendulum subsystem with fixed trolley position and a free trolley position while there is no pendulum oscillation drive by a DC motor. The system control methods including feed forward control and feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feed forward/open-loop control ===&lt;br /&gt;
Feed forward control can change the system output directly through a pre-defined path. Feed forward control is usually used with feedback control since a feedback control system is required to track set point changes and to suppress unmeasured disturbances in system response. In system theory, reference input is necessary to control the plant, and how to set an appropriate input signal is difficult.&lt;br /&gt;
Moreover, there exists a lot of methods for optimal input-shaping, which is aim to improve system performance through system input, instead of controller. This usually has more obvious effect than the feedback control.&lt;br /&gt;
&lt;br /&gt;
=== Feedback/closed-loop control ===&lt;br /&gt;
[[File:Table of control methods comparison.jpg|800px|thumb|center|Table 1.Control methods comparison]]&lt;br /&gt;
&lt;br /&gt;
== Previous work ==&lt;br /&gt;
The swinging crane real system is designed by the workshop of University of Adelaide. Some analysis has been done by previous group, a simple PID control and current manual control have also been developed. Thus some data of the model could use by directly looking up their reports.&lt;br /&gt;
&lt;br /&gt;
Figure 4 gantry crane system is studied by last year project group. This model is based on lumped-mass model, which ignore the mass and the elongation of the rod caused by the tension force. Both of the trolley and payload are considered as point mass and moving in two-dimensional x-y plane.&lt;br /&gt;
&lt;br /&gt;
The system total settling time from last year is 4.566s. The system input signal is as Figure 5. The system response and ControlDesk results are shown in Figure 6.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Gantry Crane model in lab.JPG|400px|thumb|right|Figure 4.Gantry Crane model in lab]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feed forward current input design.png.jpg|thumb|left|450px|Figure 5.Feed forward current input design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|left|400px|Figure 6.System simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System modelling ==&lt;br /&gt;
&lt;br /&gt;
=== Simple pendulum model ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:free_trolley_position_movement_anime.gif|left|Free trolley position movement anime]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_total_energy_variance.jpg|thumb|left|450px|Figure 5.System total energy variance example]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System total energy is the summation of kinetic energy of the trolley, the potential energy and kinetic energy of pendulum load.&lt;br /&gt;
The animation on the left shows a free-trolley-position movement demonstration without friction or air-drag. It shows the energy conservation law, which means the total energy is constant all over the time, and in this particular case the system kinetic energy is complementary to potential energy. Consider a trail of total energy in a system process, shows as Figure 5, in where T1 is the acceleration time period, T2 is the deceleration period and T3 is the remain oscillation period. The magnitude of system total energy in T3 is a constant value with frictionless assumption. The left animation illustrates the system remaining oscillation relationship in T3.&lt;br /&gt;
&lt;br /&gt;
=== System equations ===&lt;br /&gt;
[[File:Instantaneous_velocity_analysis.png|300px|thumb|right|Figure 6. Instantaneous velocity analysis]]&lt;br /&gt;
&lt;br /&gt;
According to Figure 6, the system total energy could be expressed as:&lt;br /&gt;
&lt;br /&gt;
[[File:System total energy.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Taking the force relation, the system transfer function is&lt;br /&gt;
[[File:system nonlinear model_transfer function.png|300px]],&lt;br /&gt;
if the pendulum swing a small angle(i.e.less than 10 degrees), the above equations could be reduced to&lt;br /&gt;
[[File:system linear model_transfer function.png|150px]].&lt;br /&gt;
&lt;br /&gt;
By taking the Laplace transform, the system transfer function is&lt;br /&gt;
[[File:Laplace transfrom of linear transfer function.png|200px]].&lt;br /&gt;
&lt;br /&gt;
The above equations could also write as state-space model form. Assume the state variable [[File:State_variable.png|80px]], and state equation [[File:State_equation.png|80px]] the state matrices are [[File:SSM_A.png|170px]],[[File:SSM_B.png|55px]]and[[File:SSM_C.png|120px]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|+&amp;#039;&amp;#039;&amp;#039;System dynamic linear model block diagrams&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_1.png|thumb|left|350px|Transfer function model 1]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_2.png|thumb|left|450px|Trasnfer function model 2]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System_dynamic_linear_model_3.png|thumb|left|250px|State-space model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods designing ==&lt;br /&gt;
&lt;br /&gt;
=== PID control ===&lt;br /&gt;
[[File:Nonlinear model PID feedback control2.png|500px|thumb|center|Figure 7.Nonlinear model PID feedback control system diagram]]&lt;br /&gt;
&lt;br /&gt;
In this project the Figure 7 block structure is used. There are two PID controllers used to control the two state variables feedback.&lt;br /&gt;
The PID controller parameters are designed by selecting appropriate  , and gains through analysing the root-locus diagrams and considering the system robustness.&lt;br /&gt;
&lt;br /&gt;
==== Inner-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:P_controller_RLC.jpg|thumb|left|320px|P controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PI_controller_RLC.jpg|thumb|left|320px|PI controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PD_controller_RLC.jpg|thumb|left|320px|PD controller RLC]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID_controller_RLC.jpg|thumb|left|320px|PID controller RLC]]&lt;br /&gt;
|}&lt;br /&gt;
Observing from the above root-locus diagrams, PD controller has simple construction and enough to insure the stability of open-loop system.To ensure control system robustness, i.e. system is not sensitive to connector length l and load mass m changing, a robustness designing for inner-loop controller parameters is essential.&lt;br /&gt;
The inner-loop system robustness with above parameters will have the tolerance of connector length changing 10% (from 0.389m to 0.475m), mass of load changing 44% (0.308kg to 0.792kg).&lt;br /&gt;
&lt;br /&gt;
==== Outer-loop controller design ====&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design.jpg|thumb|left|550px|Figure 8.position PID controller design]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:position_PID_controller_design_bode.jpg|thumb|left|550px|Figure 9.position PID controller bode diagram]]&lt;br /&gt;
|}&lt;br /&gt;
The outer loop is designed using the Simulink built-in function, PID self tuning with considering the following conditions:&lt;br /&gt;
•	Overshoot ≤ 5%&lt;br /&gt;
•	Settling time ≤ 5s&lt;br /&gt;
•	Steady state error ≤ ±1%&lt;br /&gt;
&lt;br /&gt;
The outer loop PID controller response tuning design is shown as Figure 8. The tuning Bode diagram is shown as Figure 9.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:PID control simulation result.jpg|thumb|250px|right|PID control simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fuzzy-logic control ===&lt;br /&gt;
Fuzzy logic control is a rule-based control method. The controller is designed with a set of fuzzy rules for both input and output sides. Figure 10 shows the basic structure of a fuzzy control system.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy_control_system_basic_structure.jpg|thumb|left|600px|Figure 10.Fuzzy control system basic structure]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy control system project structure.jpg|thumb|left|550px|Figure 11.Fuzzy control system simulation structure]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In classic control field, the precision of a control system modelling effects the system behaviour most. The dynamic information of the system state could help achieve the goal of accuracy control. However, the number of the state variables are too much for a complex system, and they may have influence to each other, thus it is difficult to describe the system state correctly. Fuzzy logic control uses the idea and theory of fuzzy algorithms to describe the system state. Fuzzy control is a nonlinear control method, and it also belongs to intelligent control branch.&lt;br /&gt;
In general, a control engineer will use classic algorithms (of the classic PD type, for example) if the system can be modelled and fuzzy algorithms (of the fuzzy PD type, for example) if the system cannot be modeled (or can only be partly modeled).&lt;br /&gt;
&lt;br /&gt;
In this project, there are 4 state variables, which defined in previous. Based these variables, two fuzzy controllers are used. The system simulation diagram shows as Figure 11.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzification design ====&lt;br /&gt;
The fuzzyfication process uses fuzzy state variables to describe the system. Assume the state variables and control variable are:&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzification errors.jpg|450px|center]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Fuzzy rules bar.jpg|550px|thumb|center|Fuzzy rules bar]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The state variables considered can be positive, zero or negative, also can be large and small. Presume there are 5 quantified intervals set for input variables, in which are “negative large” (NL), “negative small” (NS), “zero” (ZR), “positive small” (PS) and “positive large” (PL). While there are 5 quantified regions set for output, in which are “large acceleration” (LA), “slight acceleration” (SA), “zero acceleration” (ZA), “slight braking” (SB) and “large braking” (LB), illustrates as the fuzzy rules bar.&lt;br /&gt;
&lt;br /&gt;
==== Fuzzy rules define ====&lt;br /&gt;
The fuzzy rules are defined as term of Θ (ZR, PS; AS) for example. Table 7 presents the corresponding relationship of the angular error, the angular acceleration error and the correction output acceleration. Table 8 is the position rule matrix, similar as Table 7. The example rule could be interpreted with the following implication:&lt;br /&gt;
If the angular error εθ is ZR and the variation of the angular error is PS, then the trolley acceleration Γ is AS.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Angle error fuzzy rules.jpg|thumb|left|150px|Figure 7.Angle error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Position error fuzzy rules.jpg|thumb|left|150px|Table 8.Position error fuzzy rules]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Maximum_method_example_Simulink_diagram.jpg|thumb|left|450px|Figure 12.Maximum method example Simulink diagram]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Defuzzification design ====&lt;br /&gt;
The process of selecting the output from the two fuzzy controllers is called defuzzification. There are several methods to achieve defuzzification: the method of the center of gravity, the method of the maximum, and the method of the mean value of the maxima. In this project, the simplest one, maximum method, is used.&lt;br /&gt;
In Simulink, this selection is realized through switch function, shown as Figure 12, and the result in scope is 1 in this case.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space model sim.gif|right]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:State-space_model_feed-forward_simulation_result.jpg|thumb|250px|right|State-space model feedforward simulation result]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Position manual control ===&lt;br /&gt;
&lt;br /&gt;
== Hardware test and interfacing ==&lt;br /&gt;
The verified model is the precise nonlinear model.  The verification process is taken by giving an initial angle  to both simulation model and practical model, comparing their angular response. From Figure 55, the angle decay curves are similar according to the envelope and time period. Thus the simulated model is considered to be correct, and enough close to the practical model.&lt;br /&gt;
However, the large friction along grid is varied, hence it is difficult to add this parameter to the simulation model. The friction implemented is achieved through an independent module.&lt;br /&gt;
The tested dumping factor D=9, and at same point, to compensate the friction, the equivalent mass of trolley used is M*=7kg.&lt;br /&gt;
&lt;br /&gt;
[[File:Model verification_free-trolley position.jpg|300px|thumb|center|Figure 6. Model verification free-trolley position swinging angle comparison]]&lt;br /&gt;
&lt;br /&gt;
== Results comparison ==&lt;br /&gt;
Figure 62 to Figure 64 show the results comparison between last year and this year, PID feedback control and PD type fuzzy logic feedback control. The system position response and angular response are analysed and organized into Table 10. The data is analysed and calculated according to Figure 65 and Figure 66. Note that the period of oscillation T should be same if considering frictionless residual oscillation. In this case the value of T is used the angular oscillation period, since the friction on grid is large and the motor is under current control all the time. The system performance is mainly determined by the total consuming time, which from system start until settled.&lt;br /&gt;
The requirement of project is to move the trolley for 0.5m along grid, and find optimal solution for overall consuming time without considering other limitations. According to Table 10, the steady state position errors are all under 5%, which is acceptable. The PID control result yield a large rising time, which means the system has a lower responding speed. Both of the two methods developed in this project has improved the system consuming time. Moreover, comparing with the position over shoot and maximum angle, it could be seen that the result from last year is much worse than this year.&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System simulation result.jpg|thumb|center|300px|Figure 16.System simulation result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using PID controller ControlDesk test result.png|thumb|left|430px|Figure 17.Feedback control using PID controller ControlDesk test result]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:Feedback control using fuzzy logic controller ControlDesk test result 2.png|thumb|left|450px|Figure 18.Feedback control using fuzzy logic controller ControlDesk test result]]&lt;br /&gt;
|}&lt;br /&gt;
{| border=&amp;quot;0.5&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System position response analysis.jpg|thumb|left|530px|Figure 18.System position response analysis]]&lt;br /&gt;
| valign=&amp;quot;center&amp;quot;|&lt;br /&gt;
[[File:System angular response analysis.jpg|thumb|center|800px|Figure 19.System angular response analysis]]&lt;br /&gt;
|}&lt;br /&gt;
[[File:Table of results comparison.jpg|thumb|left|530px|Table 2.Table of results comparison]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
=== Skills training and professional development ===&lt;br /&gt;
Among the simulation state, the required skills include analysis and modelling physic model, Matlab simulation programming, dSPACE using method, and encoder and sensor devices using knowledge.&lt;br /&gt;
During the project period, the team cooperation ability, the ability to communicate or negotiate with supervisor, the capability of literature review, time management and project management skill and other professional skills would be developed.&lt;br /&gt;
All of the skills are essential for further research activities and could be apply to career.&lt;br /&gt;
&lt;br /&gt;
== Group members ==&lt;br /&gt;
Liyan Yi&lt;br /&gt;
&lt;br /&gt;
Xianghui Ma&lt;br /&gt;
&lt;br /&gt;
== Supervisors ==&lt;br /&gt;
Dr.Wen Soong [http://www.adelaide.edu.au/directory/wen.soong]&lt;br /&gt;
&lt;br /&gt;
Dr Braden Phillips [http://www.adelaide.edu.au/directory/braden.phillips]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1]	A. Ridout, “Anti-swing control of the overhead crane using linear feedback”, Journal of Electrical and Electronics Engineering, Australia 9(1/2), 1989, 17-26.&lt;br /&gt;
&lt;br /&gt;
[2]	A. Ridout, “New feedback control system for overhead cranes”, in Proceedings of the Electric Energy Conference, Adelaide, Australia, 1987, vol.1, pp.135-140.&lt;br /&gt;
&lt;br /&gt;
[3]	APPLETON MARINE, INC., 2014, “Knuckle boom crane: Model KB”, viewed 29/08/2014,&amp;lt;http://www.appletonmarine.com/marine-products/cranes.html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4]	B. Cazzolato, “Advanced PID Control (2013) Control System Implementation”, University of Adelaide, Adelaide, SA, Australia. 2013. &lt;br /&gt;
&lt;br /&gt;
[5]	B. Kolar &amp;amp; K. Schlacher, 2013, “Nonlinear control of a gantry crane”, in Computer Aided Systems Theory- EUROCAST, 14th International Conference, Las Palmas de Gran &lt;br /&gt;
Canaria, Spain, pp.289-296.&lt;br /&gt;
&lt;br /&gt;
[6]	C. Yang, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[7]	DS1104 R&amp;amp;D Controller Board Cost-effective system for controller development, dSPACE Gmbh. P aderborn, Germany. 2013 &lt;br /&gt;
&lt;br /&gt;
[8]	E. Abdel-Rahman, A. Nayfeh &amp;amp; Z. Masoud, 2003, “Dynamics and control of cranes: a review”, Journal of Vibration and Control 9, 863-908.&lt;br /&gt;
&lt;br /&gt;
[9]	Galieo’s Pendulum: from the rhythm of time to the making of matter, RG.Newton, London, England, 2004.&lt;br /&gt;
&lt;br /&gt;
[10]	K. Sultan, “Inverted Pendulum, Analysis, Design and Implementation”, Institute of Industrial Electronic Engineering, PCSIR, Karachi, Pakistan, Rep. 2003. &lt;br /&gt;
&lt;br /&gt;
[11]	M. Ahmad, A. Nasir, M. Najib &amp;amp; H. Ishak, “Anti-sway Techniques in Feedback Control Loop of a Gantry Crane System”, Control and Instrumentation Research Group (COINS), &lt;br /&gt;
Faculty of Electrical and Electronics Engineering, University Malaysia Pahang, 2009.&lt;br /&gt;
&lt;br /&gt;
[12]	M. Mattews, C. Gauld &amp;amp; A. Stinner, “The Pendulum”, Springer, Vol.13, No.4-5 and Vol.13, No.7-8, the Netherlands, 2005.&lt;br /&gt;
&lt;br /&gt;
[13]	M. Solin, W. Di &amp;amp; A. Legowo, “Fuzzy-tuned PID Anti-swing Control of Automatic Gantry Crane”, Department of Machatronics Engineering, International Islamic University Malaysia, Kuala Lumpur, Malaysia, 7, January, 2008.&lt;br /&gt;
&lt;br /&gt;
[14]	M. Zawawi, J. Bidin, M. Tumari &amp;amp; M. Saealal, “Investigation of Classical and Fuzzy Controller Robustness for Gantry Crane System incorporating Payload”, in Third International Conference on Computational Intelligence, Modelling &amp;amp; Simulation, Pekan, Malaysia, 2011.&lt;br /&gt;
&lt;br /&gt;
[15]	S. Bruins, “Comparison of Different Control Algorithms for a Gantry Crane System”, HAN University, Arnhem and Nijmegen, The Netherlands, Intelligent Control and Automation, January, 2010, pp.68-81.&lt;br /&gt;
&lt;br /&gt;
[16]	W. Du, Z. Xie, F. Lu &amp;amp; Y. Cao, “Gantry crane dynamic modelling and motion control”, Applied Mechanics and Materials, Vol.419, 2013, pp.649-653.&lt;br /&gt;
&lt;br /&gt;
[17]	W. Soong, “DC Machines: Parameter Measurement and Performance Prediction”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2008.&lt;br /&gt;
&lt;br /&gt;
[18]	X. Bai, “Swinging Crane Simulator”, School of Electrical &amp;amp; Electronic Engineering, University of Adelaide, Adelaide, Australia, 2014.&lt;br /&gt;
&lt;br /&gt;
[19]	X. Yu &amp;amp; W. Yao, “Optimal Composite Nonlinear Feedback Control for a Gantry Crane System”, Department of Automation, Xiamen University, Hefei, China, 2012, pp.601-606.&lt;br /&gt;
&lt;br /&gt;
[20]	A. Benhidjeb &amp;amp; G. Gissinger, “Fuzzy Control of An Overhead Crane Performance Comparison with Classic Control”, Control Eng. Practice, Vol.3, No.12, 1995, pp.1687-1696.&lt;br /&gt;
&lt;br /&gt;
[21]	dSPACE_guide_encoder&lt;br /&gt;
&lt;br /&gt;
[22]	M. Solihin &amp;amp; Wahyudi, “Sensorless anti-swing control strategy for automatic gantry crane system: soft sensor approach”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.992-996.&lt;br /&gt;
&lt;br /&gt;
[23]	K. Astrom &amp;amp; T. Hagglund, “PID controllers: Theory, Design and Tuning”, 2nd ed, Research Triangle Park, NC 27709, USA: ISA – The Instrumentation, Systems and Automation Society, 1995.&lt;br /&gt;
&lt;br /&gt;
[24]	M. Solin &amp;amp; Wahyudi, “Fuzzy-tuned PID Control Design for Automatic Gantry Crane”, International Conference on Intelligent and Advanced Systems, ICIAS IEEE, 2007, pp.1092-1097.&lt;/div&gt;</summary>
		<author><name>A1653368</name></author>
		
	</entry>
</feed>