• No results found

Iterative Learning Control model for a Resistive Wall Mode Active Controller

N/A
N/A
Protected

Academic year: 2021

Share "Iterative Learning Control model for a Resistive Wall Mode Active Controller"

Copied!
65
0
0

Loading.... (view fulltext now)

Full text

(1)

Degree project in

Iterative Learning Control model for a

Resistive Wall Mode Active Controller

in a Reversed Field Pinch Fusion Experiment

Taurug Eric Anderson

Stockholm, Sweden 2013

XR-EE-FPP 2013:001 Fusion Plasma Physics

(2)
(3)

Iterative Learning Control model for a Resistive Wall Mode

Active Controller in a Reversed Field Pinch Fusion

Experiment

Taurug Eric Anderson

Master Thesis

Supervisor

Dr. Erik Olofsson

Examiner

Dr. Per Brunsell

KTH Royal Institute of Technology Department of Fusion Plasma Physics

(4)

ii

Abstract

The EXTRAP T2R is a Reversed Field Pinch (RFP) device purposed to conduct magnetic confinement fusion research. Magnetic confinement works on the principle of isolating the hot plasma from the cool walls by locking in the plasma onto the magnetic field lines. Due to the generally unstable nature of plasma, the plasma column will shift off its centered position and encroach upon the cooling walls. To counteract this, a series of magnetic sensor coil are placed around the torus that serve as the input for another set of coils that will generate a magnetic field to force the plasma column back in place. This is a feedback mechanism that uses a Proportional-Integral-Derivative (PID) as the loop gain control mechanisms. While this was effective in stabilizing the system it was discovered that during the start up phase of the experiment there was a repeatable pattern of disturbance. As such it offers the opportunity to make use of a feed-forward Iterative Learning Control (ILC) that could provide a much more precise stabilization and occlude the possibility of saturating the feedback coils. In this thesis an ILC system will be built upon the existing PID system, it will be modeled in MATLAB and SIMULINK then run to simulate and gauge its performance.

(5)

iii

Acknowledgments

I would like to thank my supervisor Erik Olofsson for his support in this thesis; his in-depth understanding of EXTRAP T2R was indispensable for the model formulation as well as his suggestions and recommendation of background material was greatly appreciated. I would also like to thank Per Brunsell for his availability and guidance in putting this thesis together. I would also like to thank KTH for the opportunity to continue my studies here in Sweden; my time here has been very fruitful in both personal and intellectual development. A special thanks to all the people that made my time here a wonderful and interesting experience.

(6)

iv

Contents

1. Introduction

...1 1.1 Thesis ...1 1.1.1 Goals ...1 1.1.2 Specific tasks ...2 1.2 Background ...2

1.2.1 Current global energy situation ...2

1.2.2 Physics of Nuclear Fusion ...6

1.3 Fusion Implementation ... 11

1.3.1 Reactor technology... 11

1.3.2 Important fusion factors ... 13

2. Theory

... 15

2.1 The Reversed Field Pinch... 15

2.1.1 Benefits of the RFP ... 16 2.1.2 Disadvantages of the RFP ... 16 1.1.3 Design of RFP ... 17 2.2 Control theory ... 18 2.2.1 Linearity... 20 2.2.2 Laplace transform... 20 2.2.3 Transfer function ... 21 2.2.4 State Space ... 21 2.2.5 PID theory... 21 2.3 Repeatable disturbances ... 23 2.4 ILC Theory ... 23

3. Methods

... 27

3.1 Plasma-wall feedback dynamical modeling... 27

4. Results

... 33

(7)

v

4.2 Additional safety functions ... 45

4.3 Suggested future development... 51

5. Conclusion

... 52

Appendix A... 53

MATLAB code ... 53

(8)

vi

Abbreviations

PID Proportional Integral Derivative RWM Resistive Wall Mode

RFP Reversed Field Pinch

ILC Iterative Learning Control NBI Neutral Beam Injection RF Radio Frequency

ITER International Thermonuclear Experimental Reactor JET Joint European Torus

SISO Single Input Single Output MIMO Multiple Inputs Multiple Outputs LFTR Liquid Fluoride Thorium Reactors

(9)

1

Chapter 1

Introduction

1.1 Thesis

1.1.1 Goals

As there is already an existing Proportional-Integral-Derivative (PID) feedback controller system as the controller for the Resistive Wall Mode (RWM) Active Controller, the first stage will be to simulate a working model in MATLAB and SIMULINK. This means using all the real parameters and equations of the EXTRAP T2R so as to make the simulation as realistic as possible. With a working model in place the Iterative Learning Control (ILC) portion can then be tackled. As there are various methods of implementing an ILC system they will have to be evaluated to determine the best choice for our situation. The chosen method is the PD-type (Proportional-Derivative) as it is simple yet quite robust, although it does have to be tuned to the system which can be a tedious process. A simulated signal of various kinds will be created to act as the disturbance shape, which is currently unknown, as well as expected white nose and chaotic instabilities. When properly tuned and tested for robustness the ILC system can demonstrate its effectiveness in compensating for the disturbance. This work may then be used in the future to implement the ILC system in the EXTRAP T2R fusion experiment.

(10)

2

1.1.2 Specific tasks

The first objective is to become versed in Iterative Learning Control (ILC) and its applications. In that objective the following papers where quite informative [1, 2, 3, 4]. With the understanding of ILC and having chosen an implementation method of the PD-type, as it would require the minimum amount of modifications to the existing system, the design process can proceed. The next step is to construct the existing PID plasma wall system [6] as a simulation model and then the ILC is built to run in parallel with it. Some additional safeguard such as signal saturation blocks and a module that can rebuild the shape of the disturbance will be added for security and additional functionality.

1.2 Background

1.2.1 Current global energy situation

Our modern society is the product of technology, that technology is fueled by energy which is absolutely essential for life as we know it. This energy comes from a variety of sources and can be broken down into three general categories known as fossil fuels, nuclear and renewable energy. A comprehensive portrait of the worlds current energy situation of the can be found here [10], while a great reference for sustainable energy matters can be found here [14].

The most popular and prolific energy source is the category of fossil fuels such as oil, coal and natural gas; these are fuels that are removed from the earth to be combusted in some sort of motor or furnace. While it is a very practical and established technology all evidence indicates the current supplies are running low and besides it is a harmful technology to the environment as atmospheric carbon is a green house gas and sulfur emissions can result in acid rain.

The next class is nuclear; this is the fission of a heavier element into lighter ones. These fuels consist of uranium and plutonium, while the availability of such fuels are expected to last hundreds of years, as with all fuels that are mined from the earth it will become increasingly

(11)

3

difficulty and costly to extract them as the easiest ones to reach will be consumed first. Yet the biggest problem with nuclear is that the fission process produces large amount of highly radioactive waste product that must be safely sequestered for many millennia [11]. Yet there are some really interesting possibilities for Liquid Fluoride Thorium Reactors (LFTR). Unlike standard reactors the only consume a small percentage of the fuel, thorium fuel is completely consumed but it is still in its infancy [12].

The last category is that of renewable energy sources like wind, solar, hydro, geo-thermal and biomass. The prime advantage of these energy sources is that the source can not be depleted although the availability of power production can be saturated. Most of these renewable energy sources, essential get their power from the sun and are thus infinitely renewable [8].

Wind power is generally limited to areas of higher wind volume but even then wind availability is not always consistent so as a power source it is largely supplementary to other less intermittent sources. As an intermittent power source it can greatly befit from a cheap, efficient and scalable energy storage technology; one storage method that shows great promise is magnetically suspended, evacuated flywheel technology.

The amount of solar energy that falls on the earth can easily supply all our energy needs as one year alone of sun fall will deliver more energy that can be extracted from all the fossil fuels combined. Unfortunately the current highest efficiency of photovoltaic cell is at most 15 percent and the manufacture process is by no means an environmentally friendly process, furthermore the efficiency of the cell decays with time. Solar concentrators can have efficiencies of up to 30 percent but given the larger infrastructure needed to operate them it is currently only viable in very sunny areas and it also requires large surface areas of land.

A hydroelectric plant capable of generate more renewable power than any other kind of power plant including nuclear and coal, the worlds 4 largest power plants are of hydroelectric type, yet as it requires a geographical viable locations to dam up and collect water most of the viable locations have already been exploited and it is essentially saturated as a power. The few remaining projects in the works are currently under environmental fire because of the ecological destruction through flooding.

(12)

4

Geothermal is clean, continues, has low operational cost but is currently limited to regions with magma close to the surface and drilling requires a high initial investment cost with expected failure rate of 20% [9]. It also requires a water source to function and heat content of a region can be depleted if it is abused as many plants have experienced a reduction in power output over time. An overview of geothermal energy can be seen at [13].

Biomass has a conversion of sunlight to energy efficiency of less then 1% and as land is an appropriately scarce resource that can have better uses. It is only viable as an auxiliary power source for agriculture waste close to the waste creation sites.

A break down of these energy sources and usage for the United States in 2011 can be seen in Figure [1.1]. Take note in the usage end that the largest losses (Rejected Energy) are in the electrical transmission & distribution as well as transportation, these are areas that progress can be made but the key point is that the dominant energy sources are of a non-renewable type and thus finite.

It is clear that the current energy situation in untenable and a solution has to be found. And the most apparent solution is to recreate that which is the greatest source of power available to us, the sun, and that process is called fusion.

(13)

5

(14)

6

1.2.2 Physics of Nuclear Fusion

Unlike fission that produces power from the splitting of atoms, fusion produces power from the combining of atoms into heavier elements. As the nuclei of atoms are positively charged from the protons any attempt to bring them together will result in a repulsive force with the energy needed to overcome it known as the Coulomb potential given by Equation [1.1].

(1.1)

The variable is the electron charge, which is the same charge of a hydrogen nucleus only of the opposite sign, is the permittivity of free space and is the distance between them. This description represents an individual particle set; the actual system will be a Maxwell distribution with both hotter and colder atoms for an average energy level. Once the nuclei are sufficiently close together the strong nuclear force that only operates only at a very short distance will hold them together Figure [1.2].

Figure 1.2: Strong Nuclear Force & Coulomb Repulsion (Image credit: Matt Strassler)

Given that as you go up in atomic number so does the combined charge of the nucleus it stands to reason that the greater the force needed to bring the two nucleus together to achieve fusion as can be seen in figure [1.3].

(15)

7

Figure 1.3: Cross-section distribution of fusion reactants with energy (Image credit:

http://iec.neep.wisc.edu/operation.php)

It can be seen in the figure that hydrogen is the easiest to achieve fusion but even then, according to classical physics the energy level needed to achieve fusion is V = 500 keV, this means a temperature of 2300 million kelvin. Fortunately the reality of the process is that there occurs something called quantum tunneling, this allows the nucleus to traverse part of that final distance without such an exorbitant energy requirement Figure [1.4].

(16)

8

Figure 1.4: Quantum tunneling and coulomb barrier representation . (Image credit: [5])

The nucleus does not actually traverse that distance of the Coulomb barrier but it has to do with the quantum location probability field that overlaps with the other nucleus probability field, as such it brings down the temperature needed to initiate fusion down to 150 million Kelvins (13 keV).

There are various hydrogen isotopes and heavier elements that can produce fusion, the energy levels needed to achieve fusion differs but the lowest energy requirement and thus first generation designs towards the implementation of fusion are based on the Tritium-Deuterium reaction [1.5].

(17)

9

Figure 1.5: Reaction of Deuterium Tritium fusion and its products. (Image credit:[5])

The reaction of the lowest energy and thus easiest to achieve fusion with is that of tritium and deuterium, with and end product of helium-4 and a neutron, this process will generate 17.6 MeV per reaction. The source of this energy comes from the fact that the mass of the nucleus will weigh less then the sum of the individual parts (protons, neutrons), this is known as mass defect. The amount of energy of this mass difference is given by the Einstein equation for equivalence of mass and energy. The measurement of this is known as binding energy, the greater the binding energy the more stable is the element until it reaches iron. So the binding energy difference of the reactants and the product will be the energy released. Below in Figure [1.6] can be seen some of the related fusion reactions and their energy outputs from the binding energy. Reactants Fusion Products 4 He 2 D 3 T n 14.1 MeV 5 He Energy 3.5 MeV

(18)

10

Figure 1.6: Biding energy scale of relevant atoms (image credit: [5])

Deuterium is a hydrogen isotope with one proton and one neutron, and Tritium is another isotope with 2 neutrons. Deuterium is for all extents virtually limitless as it can be extracted from sea water and is in an abundance of 1 deuterium atom for every 7000 normal hydrogen atoms. Tritium is harder so come by as it has a half life of 12.7 years and so it must be bred from lithium by the collision with a fast neutron, the availability of lithium is sufficiency abundant to last thousands of years which by that time more advanced forms of fusion will be achieved. There is of course competition for lithium such a batteries and mineable supplies may be quickly exhausted however as lithium can also be extracted from seawater it is still available for more imperative use.

(19)

11

There is an Equation [1.2] that is used to determine the condition to achieve fusion and is known as Lawson’s criteria. It is a triple product of three variables that must reach a number for said reactants to react in fusion, in this case the value is for Deuterium-Tritium.

(1.2)

As can be seen the three variables are = density, = confinement time, and T = temperature as such each variable represents a general strategy to achieve fusion. The sun makes use of a high confinement time as it takes up to thousands of years for a reaction to occur within the core of the sun where temperatures of 15 million kelvin and densities of 150 g/cm³ can be found. High density is the strategy taken in the method of fusion known as inertial confinement; this is the use of high energy beams that will uniformly ablate a frozen pellet that will produce a shockwave that will reach its maximum at the center of the pellet and create the high density needed to achieve fusion. The final method makes use of high temperature approach by suspending the particles in a magnetic field and heating them up, this will be the focus of our work as it is the kind of device this thesis work is based on.

1.3 Fusion Implementation

1.3.1 Reactor technology

As the temperature need is in the range of 150 million kelvins no material can survive contact with the plasma and thus it must be confined in a vacuum held in place by magnetic fields. Original confinement approaches involved magnetic mirrors and bottles but had problems with containment as various types of drift led to the plasma escaping. What was needed was a theoretically infinite containment chamber and this what realized by the shape of a torus that would loop back into itself. To address the drifts problem it was needed to induce a twisting in the magnetic fields so that as the charged particle moves around the torus the drift would bring it back to the same place. The two methods to create this twist was to have twisted toroidal

(20)

12

magnets and came to be known as a Stellarator Figure [1.7] and the other method made use of a poloidal magnetic field to induce the twist and was called a Tokamak Figure [1.8].

Figure 1.7: Stellarator model of plasma and twisted magnetic coils (image credit: Splung.com)

Figure 1.8: Model of Tokamak plasma and coils (image credit: M. Decreton, SCK-CEN)

(21)

13

The largest project in fusion is the ITER experimental power plant currently being built in Cadarache France, it is expected to achieve a power amplification factor of Q=10 and is designed to generate 500MW of power. The Tokamak, as the current forefront design in development, is generally used as a standard that other designs are compared to in discussions.

After containment, heating is the most important thing for fusion. Initial heating is from ohmic heating, this is running a current through the plasma and the resistance will heat up the plasma, however this will only work until a certain point because as the plasma heats up its resistivity decreases and the heating efficiency is insufficient in achieving fusion-grade temperatures. At this point other external methods must be used to continue raising the temperature. One is Radio Frequency (RF) heating that will pump energy (RF) into the plasma from antennas outside of the plasma column that has been tuned to resonate with the plasma and raise its temperature. The other method is Neutral Beam Injection (NBI) that will shoot a beam of neutral particles into the plasma with the resulting kinetic collision increasing the temperature of the plasma, the beam consists of ionized particles that have been electrically accelerated to a desired velocity then crossing a gas chamber to absorb electrons so it can traverse through the magnetic confinement fields unimpeded.

The other fusion design of note is the Reverse Field Pinch (RFP) and it is similar in shape to the tokamak but with a different magnetic confinement method, it will be discussed in more detail later on as this is the kind of device the work of this thesis is based on.

1.3.2 Important fusion factors

Fusion energy gain factor is sometimes referred to as big Q given by the following Equation [1.3]. The numerator is the power extracted from the reactor and the denominator is the power expended to initiate the reaction. A Q of 1 denotes break even condition while a Q of infinity denotes a reaction working under its own fusion power. The highest Q rating of Q = 1 has been briefly achieved by JET in the UK; ITER is expected to have a Q = 10 rating.

(22)

14

Plasma Beta defines the ratio of thermal energy in the plasma to the magnetic energy confining the plasma. As such a higher Beta is desirable, how to compute the average Beta can be seen in the following Equation [1.4].

⁄ (1.4) Safety factor is defined by q; this represents the amount of times the magnetic field line will undergo a toroidal rotation per poloidal rotation with the magnetic field lines creating the apparent shape of a helix twisting around the torus. Studies have shown the that higher q values will result in greater stability, this can be reasoned by having more twists of the field lines will result in a course that will pass through different areas of the magnetic gradient; so the drift directions will be more balanced and be closer to a theoretical centerline within the helix path of motion. The method to calculate q can be seen in the following Equation [1.5].

(1.5)

The variables are represented as follows; r = Minor radius, R = Major radius, = Toroidal magnetic field and = Poloidal magnetic field.

(23)

15

Chapter 2

Theory

2.1 The Reversed Field Pinch

The Reverse Field Pinch is a toroidal based device similar to the tokamak but with a different type of magnetic confinement. Its namesake is based on the fact that there is a region close to the outer wall of the toroidal magnetic field actually reverses direction from the initial direction. This can be seen in the Figure [2.1] along with the individual toroidal and poloidal fields.

Figure 2.1: A view of RFP field lines. (Image credit: S.C. Prager,FPA Symposium 2006)

(24)

16

2.1.1 Benefits of the RFP

 Given the modest toroidal magnetic field needed it is possible to operate the RFP with toroidal coils of non-superconducting material, as such there is no need for expensive alloys and cryo systems.

 Higher beta values when compared to a tokamak. This is due to lower magnetic energy needed for confinement of the plasma energy when compared to the tokamak toroidal magnetic field.

 The plasma confinement of the RFP is not as dependent on specific aspect ratios and settings as other confinement methods so it allows for greater scalability of design for the reactor.

 Lastly and most importantly is that it may be possible to come very close to achieving fusion using only ohmic heating. This would be very economically desirable as other large complex heating systems would unnecessary with only a minor additional heat source used.

2.1.2 Disadvantages of the RFP

 Near the plasma edge there is a low magnetic field and at the reversal point of the toroidal field where the value of q will approach zero, this means that in these areas the plasma is subject to growing MHD turbulence.

 To drive the large transformer for the ohmic heating a very large external source of AC current is needed. The current system charges large banks of capacitors that are then discharged into the rector.

 The confinement time is much lower then a tokamak and is not expected to be capable of achieving continuous modes of operation.

 As the confinement time is lower then a Tokamak the required plasma density according to the Lawson’s criteria needs to be of higher plasma density in order to achieve ignition.

(25)

17

1.1.3 Design of RFP

As the instabilities of the plasma will cause the plasma to encroach the walls, this is where the Resistive Wall Mode comes into effect, if the containment shell were a perfect conductor the magnetic field lines that would be moved into the shell would be unable to traverse it and would be compressed against the wall to provide a repulsive force opposing the contact of the plasma into the shell wall. As such the shell material is not a perfect conductor the field lines will traverse the shell walls resulting in loss of containment. The current solution to this is to have a magnetic sensor array that detect these encroaching field lines and signal other active coils that will generate a counteracting magnetic field forcing the plasma column back into position; this is sometimes known as the Intelligent Shell. The existing control system uses a PID controller to control this Iintelligent Shell and this where the proposed ILC will work in conjunction with the existing system. A representation of the sensor and active coils can be seen in Figure [2.2] below.

Figure 2.2: Magnetic sensor coils in blue and active coils in red. (Image credit: http://www.kth.se/ees/omskolan/organisation/avdelningar/fpp/research/experiment)

(26)

18

Figure 2.3: Relevant specification for EXTRAP T2R. (Image credit:

http://www.kth.se/ees/omskolan/organisation/avdelningar/fpp/research/experiment)

Listed above are some of specifications of the RFP experiment EXTRAP T2R.

2.2 Control theory

Control systems are a fundamental part of modern life; it is an essential and integral part of any system that has automation, remote control or computer controls. A simple example is the thermostat that controls the temperature in a house, the controller is set at a desired temperature and if the ambient temperature changes the controller will activate the heater or cooler unit until the temperature returns to the set temperature then deactivate. There are many more advanced control systems such as those found in robotics and fly-by-wire aircraft yet all operate on a similar principle. Control systems can be broken down in two general types. The first is the open-loop control system, this is akin to holding the steering wheel in a car at the center position and expecting the car to drive straight, it will drive relatively straight but it is subject to internal

(27)

19

(tire balance) and external (uneven road) disturbances that will likely result in driving off the road. The other method known as a closed-loop (feedback) is akin to the driver observing a deviation it the direction of the car and correcting with the steering wheel as to straighten the course. This correction and greater accuracy is the result of feedback information acquired visually while in the open-loop there is no feedback. A flow diagram of these two control systems can be seen in the following Figure [2.4]

Figure 2.4: A flow diagram of both open and closed loop control systems. (Image credit:Ghanshyam

Khatri)

In the closed loop the feedback can be seen where a sensor is used to detect the relevant value and the difference between this and the reference value is the error (e), this is then fed into the controller thus creating the feedback loop.

(28)

20

The flow diagram is a visual representation of a system where each block represents an action or process on the input signal into the output signal.

2.2.1 Linearity

A linear system is one that the input is proportional to the output in that it follows these two conditions:

 Additive (Superposition), ( ) ( ) ( )

 Homogeneity, ( ) ( )

Any function not adhering to these conditions in non-linear and more complex in its behavior, many real world systems are of non-linear type. Linearity makes it a lot easier to design and evaluate a system as such it is possible to take linear approximation for evaluation of a non-linear function by taking the tangent of specific points along the function. The slope of a tangent is the derivative of the function along a small region. For the non-linear function expressed as f(x) = y the slope can be obtained by the Equation [2.1]

(

)

(2.1)

With being the distance to be evaluated, so then and results in the linearized description around a chosen point.

2.2.2 Laplace transform

A Laplace transform is a change of a function by using the flowing Equation [2.2].

(2.2) The equation will result in a change from a function f(t) into an F(s) with the s variable being a complex number. The advantage of a Laplace transform is that the initial function (non-linear)

(29)

21

that would require integration and differentiation is simplified so as to be manipulated by algebraic expressions while a linear system operator can be converted to a simple multiplication in the s domain.

2.2.3 Transfer function

The flow diagrams blocks can be represented as transfer functions, these equations are in the Laplace transformed s domain. The main advantage is that they are small simple equation which makes them great for frequency domain analysis and stability evaluation; however the weakness is that it ignores initial conditions.

2.2.4 State Space

The flow diagrams blocks can also be represented by State Space equations operating in the time domain and can offer some advantages over transfer functions. Besides making use of the initial condition it also can easily handle systems with multiple inputs and outputs. Ultimately State Space is better suited for system evaluation of control systems. In its most general form it is written in the following form Equation [2.3] with four matrix coefficients defining the equation.

(2.3)

2.2.5 PID theory

PID stands for Proportional Integral Derivative and is a feedback control mechanism that makes use of three variables that are tuned to the system to give the best possible tracking response. A representation of it functionality can be seen in Figure [2.5].

(30)

22

Figure 2.5: A breakdown of a PID controller. (Image credit:http://en.academic.ru/dic.nsf/enwiki/41570)

The proportional gain responds to the current error so the higher the gain the greater the correction and sensitivity, however if too high it can overshoot the correction and become unstable. The integral gain responds to past errors as such it will grant a faster response and can eliminate steady state errors but it can also cause an overshoot if set too high. The derivative responds to the predictive error as such it acts as a dampener and will stabilize overshoots and lead to faster settling times and stability of the system. These three values can be tuned manually using intuition or some more advanced techniques for better accuracy; the behavior of the individual variables can be seen in the following Figure [2.6]. An in-depth examination of PID controllers can be found in [7].

Figure 2.6: The effect of individual variables of PID to system. (Image credit:

(31)

23

2.3 Repeatable disturbances

Starting up the RFP is a complex procedure with multiple capacitor banks discharging at different times into the coils. It starts out by an initial toroidal magnetic field created in one direction, then the injection of gas that is ionized and locked into the magnetic field lines, the current in the plasma is increased thus heating up the plasma even further and then an external secondary toroidal field will be applied in the opposite direction resulting in the reversal of the toroidal field at the edges near the wall. In spite of all these happenings and the chaotic nature of plasma it was observed that during the start up phase a disturbance pattern that is repeatable from shot to shot. As the Intelligent Shell was operating on a PID feedback controller it was subject to lag in the time response that could saturate the coils if the disturbance was not compensated for fast enough, this repeatable start up disturbance offered information that could be used in a feed forward controller that could result in a lag-less response of the intelligent shell for repeatable disturbances.

2.4 ILC Theory

ILC stand for Iterative Learning Control, this means the act of learning through repeating an action of the same kind until perfect control is achieved. An example of this is a basketball player shooting a ball to the hoop, in the beginning he will have poor accuracy, with each miss he will visually observe the error in his technique and apply a correction to his following shot, eventually he will achieve the perfect motion to make the ball in the hoop and with practice this control information will stored in his muscle memory allowing him to make the shot any time. This is the essence of ILC; any action that is repeated has useful information that can be used in the flowing iteration to increase the performance of the action. It can be applied to both open loop as in the example and closed loop as we will do here.

(32)

24

The primary reasons why ILC was chosen over other feed-forward methods was that it can deal with repeatable unknown disturbances, like have been discovered in the reactor start up, and the fact that it can be added to an existing feedback system like the one used in the Intelligent Shell. There are various kinds of ILC designs to be evaluated: the simplest and most prolific is the PD-type, it is fast and robust if tuned correctly and it is the one to be used as it can operate in a relatively unknown system; Plant inversion requires a highly accurate model of the system which is not available to us because of the uncertain and variable plasma dynamics of the system, however it will serve as the basis of a secondary additional function; is capable of being very fast or quite robust but the problem is that the nature of the disturbance requires some foreknowledge for a proper configuration; The quadratic optimal (Q-ILC) is capable of a achieving an optimal ILC in performance and accuracy but is also more complex [4].

The implementation of ILC can be seen in the following Figure [2.7]

Figure 2.7: A visual representation ILC feed-forward control method. (Image credit: A learning-based

(33)

25

The essence of ILC can be seen in the above figure: The current error array of iteration j will be transformed in a learning matrix L, summed with the control signal of iteration j then filtered through a high pass filter matrix Q and used as the control signal of iteration j + 1 that will result in a lower error rate with an appropriate choices of Q and L. The Equation [2.4] depicting what occurs in the Figure [2.7] is as follows.

(2.4) In the equation is the current control signal that is modified for the following iteration. Note that the error is a function from a future time step (k + 1), this means that if the disturbance is in a previous iteration it will preemptively compensate before it occurs in the next iteration, this means that the compensation can get close to a near-perfect tracking. The actual implementation to be used for this thesis’s ILC model is of a type parallel to the PID feedback controller and can be seen in Figure [2.8].

Figure 2.8: A representation of a parallel ILC on a feedback system. (Image credit: [4])

(34)

26

Initially the feedback controller is doing all of the work but with each following iteration the ILC is doing more of the work until it completely and accurately provide all the corrections for repeatable disturbances while feedback controller is left free to address the non repeatable disturbances that threaten the stability of the plasma-wall system past the initial startup phase. The Equation [2.5] used to implement the ILC in parallel to the PID for the MATLAB code is as follows. Note it incorporates the proportional gain and the derivative gain.

(35)

27

Chapter 3

Methods

3.1 Plasma-wall feedback dynamical modeling

With the ILC method selected, what was needed was to attach the ILC to run in parallel with the existing PID controller of the Intelligent Shell and tune it to the system parameters. As such the first step was to build a model of the entire RFP system including PID control, amplifier and the main plant. The actual experimental intelligent shell consists of a typical configuration of 2 x 32 coils that do have some effect from the adjoining coils but as the source paper formulation depicts an almost independent operation tuning, the model can be built as a SISO. Information about the existing system was taken from a paper [6] that was provided and authored by K Erik J Olofsson. The flow model of the experiment to be modeled shown in Figure [3.1]

Figure 3.1: Flow chart model of EXTRAP T2R intelligent shell. (Image credit:[6])

(36)

28

( ) is the reference input that is the desired magnetic field strength at the shell.

 is the reference signal filter.

 is the PID control system.

is the power amplifier for the active coils.

is the model for the Plasma-wall system

( ) is the output and the magnetic field strength (time-integrated sensor coil voltages) at the shell.

( ) and ( ) (current measurements) are both digital data output ports.

 ( ) is a unmeasured disturbance but is inserted prior to for the simulation .

This is the existing working system in the reactor that the ILC will be built upon. This model is then constructed in SIMULINK and the equations taken. However the original equation are all depicted as Transform Functions in the (s) domain, it was determined it would be easier and more accurate to work in State Space as the native formulations of ILC are in state space which allows an easy expansion from SISO to MIMO.

The following are the equations for the blocks in the original Transform Function form, as MATLAB can directly transform to State Space there was no need to transform them manually, also listed is the values that are to be used in the simulation.

 is the reference signal filter and not used when modeled independently as in this case so is of identity value and it does not affect the signal.

 is the PID control system

( )

(3.1)

The values and description of the digitized signals in the actual experiment: = Proportional Gain = 40, = Integral Gain = 5000, = Derivative Gain = 0.04, = Filter coefficient = 30.

(37)

29

(3.2)

The values and description: = Gain = 4.1, = 1.1e-3 [sec]

is the model for the Plasma-wall system

(3.3)

The values and description: = Gain for scaling to appropriate power levels of the reactor = 10e-3, = Model diffusion time = 8e-3, = Instability growth rate = 0.5.

With these equations the SIMULINK modal was constructed and can be seen in Figure [3.2]. In addition to the model blocks for the fusion reactor a three additional input port where added. One to provide the ILC corrective signal marked as w, note that it is located after the PID controller Fe and does not affect its operation in that time step. The second is where we would inject unknown disturbance signal that the ILC system is designed to correct, note that it is located after the last out port and is essentially a part of the RFP plasma model. The last of the input port is labeled e and this port will inject a chaotic signal to simulate white noise which exists to some degree in all electronics, it will also serve as a testing mechanism for the ILC correction and in particular the low-pass filter.

The Figure [3.3] represents the final product of this thesis, after the modeling of the RFP reactor successfully then the ILC system was implemented on top of it and was running concurrently, the final additions are the two saturation blocks that will digitally restrict the signal from exceeding the safety margins of the hardware and a module to rebuild the shape of the unknown disturbance signal.

The safety saturation block d_sat is limited to a value of 10 and is located after the summation of the signal from the PID and the ILC but before the amplifier. The second safety saturation block u_sat is limited to a value of 20 and is located after the amplifier but before powering the active coils.

(38)

30

The rebuild module operates by using an inverted model of the uncertain Plasma-wall system G that is fed from the output y and then subtracting u from it into another output n which is an approximation of the disturbance shape. An accurate representation of the disturbance using this method would requires exact knowledge of the Plasma-wall system, as that is unavailable any uncertainties could be compounded using the plant inversion method to determine the disturbance shape however it will still provide a adequate approximation until better methods are implemented. The approximation inversion equation is as follows, while not a true inversion it is sufficient for the approximation.

(3.4)

The values and description: = Gain for scaling to match the original = 10e-3, = Model diffusion time = 8e-3, = Instability growth rate = 0.5.

When the deduced disturbance is plotted it is first passed through a low pass filter with the MATLAB smooth function, perhaps a more accurate implementation would have been to include a zero phase low pass filter prior to the to more accurately occlude to the white noise transient disturbances.

(39)

31

Figure 3.2: Flow chart model of EXTRAP T2R intelligent shell modeled in SIMULINK with additional ports for ILC .

Fr = ref signal filter, Fe = PID gain, Fd = power amplifier, G= RFP plasma model

inputs: r = ref signal, e = white additive noise, v = pulsed unknown disturbance term (to be learned), w = feedforward control signal (ILC)

outputs: y = magnetic field signal from RFP, u = applied control current, d = applied control voltage error signal to PID is: e_pid = Fr*r - y

3 y 2 u 1 d -1 Gain x' = Ax+Bu y = Cx+Du G x' = Ax+Bu y = Cx+Du Fr x' = Ax+Bu y = Cx+Du Fe x' = Ax+Bu y = Cx+Du Fd 4 w 3 e 2 v 1 r

(40)

32

Figure 3.3: Flow chart model of EXTRAP T2R intelligent shell modeled in SIMULINK with ILC implementation and additional modules .

Fr = ref signal filter, Fe = PID gain, Fd = power amplifier, G = RFP plasma model

inputs: r = ref signal, e = white additive noise, v = pulsed unknown disturbance term (to be learned), w = feedforward control signal (ILC)

outputs: y = magnetic field signal from RFP, u = applied control current, d = applied control voltage error signal to PID is: e_pid = Fr*r - y

4 n 3 y 2 u 1 d u_sat d_sat Subtract x' = Ax+Bu y = Cx+Du Ginvert -1 Gain x' = Ax+Bu y = Cx+Du G x' = Ax+Bu y = Cx+Du Fr x' = Ax+Bu y = Cx+Du Fe x' = Ax+Bu y = Cx+Du Fd 4 w 3 e 2 v 1 r

(41)

33

Chapter 4

Results

4.1 Simulation results

The original flow diagram model did not incorporate the disturbance signal; rather it was tested using a sine wave signal implemented as a changing reference value. The model was soon upgraded to its functional mode however as the disturbance was of unknown characteristics it seemed prudent to have various different disturbance shapes so as to validate the robustness of the ILC addition. The 4 different simulated shapes where first a simple step down function, the second was an exponential decay, the third was half a cosine wave and lastly was a combination of the step function and a part of a cosine wave. The points of interests are the static, smooth curves and sharp transition points and how the ILC can deal with it.

Tuning of the PD-type ILC consisted of the Proportional Gain that determined how fast the correction signal pushed to the appropriate location, the Derivative Gain determined how fast the overshoot was dampened and lastly the bandwidth of the low-pass Q-filter was tuned to ignore the fast transients from the white noise and like fast disturbances. The Q-filter is an important factor in that it a high bandwidth would allow for faster response but a low bandwidth would make for a more accurate response with resistance to fast transients. Another important factor was the number of iterations run in the simulation, 30 was the instructed amount used, for it seemed that the tuning was specific to the amount of iteration for when the repetitions were increased the accuracy degraded, this is likely the case that the bandwidth of the Q-filter is too high and the ILC system is "overfitting" to the noise.

The first results shall be demonstrated with the ILC system inactive as a reference, only the PID feedback system will be in operation; it shall be run for 30 iteration with a disturbance of step function type and all the ILC values are set to null.

(42)

34

Only PID controller operational

Figure 4.1(a): The top graph depicts the norm of the error signal vs. iteration; the middle graph depicts the reference input as black, the initial iteration magnetic output as blue and the final iteration as red vs. time in; the bottom graph depicts the ILC correction signal in all its iterations with the red one as its final

iteration vs. time. 0 5 10 15 20 25 30 0.103 0.104 0.105 0.106 0.107 0.108 n o rm (e j ) j 0 100 200 300 400 500 600 700 800 900 -0.01 -0.005 0 0.005 0.01 y j & r t 0 100 200 300 400 500 600 700 800 900 -3 -2 -1 0 1 2x 10 -14 w j t

(43)

35

Only PID controller operational

Figure 4.1(b): The top graph depicts the pre-amplifier vs. time; the middle graph depicts the post-amplifier vs. time; the bottom graph depicts output of magnetic field strength with a reference marker at

+- 0.003 vs. time. All results are of the final iteration.

0 100 200 300 400 500 600 700 800 900 -0.8 -0.6 -0.4 -0.2 0 0.2 d P re a m p t 0 100 200 300 400 500 600 700 800 900 -3 -2 -1 0 1 u P o s ta m p t 0 100 200 300 400 500 600 700 800 900 -0.01 -0.005 0 0.005 0.01 y O u tp u t t

(44)

36

Only PID controller operational

Figure 4.1(c): The left graph depicts the error of each iteration in blue with the final iteration in red vs.

time; the right graph depicts the shape of the simulated disturbance vs. time..

As can be seen the PID feedback controller does correct for the disturbance but it is slow in its response and the overshoot error is seen in the output y past the 100ms mark as such the norm of the error accuracy does not improve with following iterations.

The next run will be with the ILC controller implemented, it has been tuned to minimize the tracking error by the 30th iteration, the setting found are Proportional Gain = 22, Derivative Gain = 400 and Q-filter at 0.4, everything else is identical to the previous run.

0 100 200 300 400 500 600 700 800 900 -12 -10 -8 -6 -4 -2 0 2 4 6 8x 10 -3 ej t 0 100 200 300 400 500 600 700 800 900 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 vd t

(45)

37

PID and ILC controller operational

Figure 4.2(a): The top graph depicts the norm of the error signal vs. iteration; the middle graph depicts the reference input as black, the initial iteration magnetic output as blue and the final iteration as red vs. time in; the bottom graph depicts the ILC correction signal in all its iterations with the red one as its final

iteration vs. time. 0 5 10 15 20 25 30 0 0.05 0.1 0.15 0.2 n o rm (e j ) j 0 100 200 300 400 500 600 700 800 900 -0.01 -0.005 0 0.005 0.01 y j & r t 0 100 200 300 400 500 600 700 800 900 -2 -1 0 1 2 w j t

(46)

38

PID and ILC controller operational

Figure 4.2(b): The top graph depicts the pre-amplifier vs. time; the middle graph depicts the post-amplifier vs. time; the bottom graph depicts output of magnetic field strength with a reference marker at

+- 0.003 vs. time. All results are of the final iteration.

0 100 200 300 400 500 600 700 800 900 -2 -1 0 1 2 d P re a m p t 0 100 200 300 400 500 600 700 800 900 -3 -2 -1 0 1 u P o s ta m p t 0 100 200 300 400 500 600 700 800 900 -4 -2 0 2 4x 10 -3 y O u tp u t t

(47)

39

PID and ILC controller operational

Figure 4.2(c): The left graph depicts the error of each iteration in blue with the final iteration in red vs.

time; the right graph depicts the shape of the simulated disturbance vs. time..

It can be seen that the ILC provides an almost perfect tracking by the time it reaches its 30th iteration, the output y error an is well within the suggested limit of 0.03 and hovers around 0.003 as can be seen in Figure [4.2b]. The norm of the error signal is about 0.004 for the final iteration, at this point it is encroaching the noise signal and the limit of its capabilities.

To test the robustness and flexibility of the ILC an additional test is devised with a combined mid operation reference change and a repeatable disturbance to evaluate the tracking; the results can be seen in Figure [4.3].

0 100 200 300 400 500 600 700 800 900 -10 -8 -6 -4 -2 0 2 4 6 8x 10 -3 ej t 0 100 200 300 400 500 600 700 800 900 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 vd t

(48)

40

PID and ILC controller operational with reference change

Figure 4.3(a): The top graph depicts the norm of the error signal vs. iteration; the middle graph depicts the reference input as black, the initial iteration magnetic output as blue and the final iteration as red vs. time in; the bottom graph depicts the ILC correction signal in all its iterations with the red one as its final

iteration vs. time. 0 5 10 15 20 25 30 0.1 0.15 0.2 0.25 0.3 0.35 n o rm (e j ) j 0 100 200 300 400 500 600 700 800 900 -0.02 0 0.02 0.04 0.06 y j & r t 0 100 200 300 400 500 600 700 800 900 -80 -60 -40 -20 0 20 w j t

(49)

41

PID and ILC controller operational with reference change

Figure 4.3(b): The top graph depicts the pre-amplifier vs. time; the middle graph depicts the post-amplifier vs. time; the bottom graph depicts output of magnetic field strength with a reference marker at

+- 0.003 vs. time. All results are of the final iteration.

0 100 200 300 400 500 600 700 800 900 -20 -10 0 10 20 d P re a m p t 0 100 200 300 400 500 600 700 800 900 -40 -20 0 20 40 u P o s ta m p t 0 100 200 300 400 500 600 700 800 900 -0.01 0 0.01 0.02 0.03 0.04 y O u tp u t t

(50)

42

PID and ILC controller operational with reference change

Figure 4.3(c): The left graph depicts the error of each iteration in blue with the final iteration in red vs. time; the right graph depicts the shape of the simulated disturbance vs. time and the dashed line the

deduced disturbance signal.

As can be seen the ILC is capable of dealing with mid-operation reference changes but its response is slower then a static reference. The disturbance rebuild module tracking is offset as the reference was not included in its formulation.

It is also usefully to evaluate the ILC in a situation where the amount of iterations is limited to 10 cycles as each shot in the RFP can be quite costly. This run will be with the ILC controller implemented, it has been tuned to minimize the tracking error by the 10th iteration, the setting found are Proportional Gain = 47, Derivative Gain = 2000 and Q-filter at 0.4. The higher gains are necessary to achieve an accurate tracking within the given iterations however one result is that the final accuracy will be less then that of the longer iteration tuning.

0 100 200 300 400 500 600 700 800 900 -0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04 ej t 0 100 200 300 400 500 600 700 800 900 -6 -4 -2 0 2 4 6 8 vd t

(51)

43

PID and ILC controller operational at 10 iterations

Figure 4.4(a): The top graph depicts the norm of the error signal vs. iteration; the middle graph depicts the reference input as black, the initial iteration magnetic output as blue and the final iteration as red vs. time in; the bottom graph depicts the ILC correction signal in all its iterations with the red one as its final

iteration vs. time. 1 2 3 4 5 6 7 8 9 10 0 0.1 0.2 0.3 0.4 0.5 n o rm (e j ) j 0 100 200 300 400 500 600 700 800 900 -0.02 -0.01 0 0.01 0.02 y j & r t 0 100 200 300 400 500 600 700 800 900 -20 -15 -10 -5 0 5 w j t

(52)

44

PID and ILC controller operational at 10 iterations

Figure 4.4(b): The top graph depicts the pre-amplifier vs. time; the middle graph depicts the post-amplifier vs. time; the bottom graph depicts output of magnetic field strength with a reference marker at

+- 0.003 vs. time. All results are of the final iteration.

0 100 200 300 400 500 600 700 800 900 -20 -10 0 10 20 d P re a m p t 0 100 200 300 400 500 600 700 800 900 -40 -20 0 20 40 u P o s ta m p t 0 100 200 300 400 500 600 700 800 900 -4 -2 0 2 4x 10 -3 y O u tp u t t

(53)

45

PID and ILC controller operational at 10 iterations

Figure 4.4(c): The left graph depicts the error of each iteration in blue with the final iteration in red vs. time; the right graph depicts the shape of the simulated disturbance vs. time and the dashed line the

deduced disturbance signal.

As can be seen from Figure [4.4a] the higher gain results an actual increase in error but it does settle down to quite an accurate tracking. But the limit of its accuracy can be seen in the norm of the error signal which is 0.008 vs. the 0.004 in the 30 iteration run.

4.2 Additional safety functions

Some of the additional features to the ILC system are the saturation safety blocks that occlude the possibility of the signal reaching the damage threshold of the hardware. This is demonstrated by introducing a disturbance (ten fold increase) that would push the ILC past the threshold limit of 10 for the pre-amp and/or 20 for the post-amp.

0 100 200 300 400 500 600 700 800 900 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04 ej t 0 100 200 300 400 500 600 700 800 900 -3 -2 -1 0 1 2 3 4 5 vd t

(54)

46

PID and ILC controller operational + Saturation limiter

Figure 4.5: The top graph depicts the pre-amplifier vs. time; the middle graph depicts the post-amplifier vs. time; the bottom graph depicts output of magnetic field strength with a reference marker at +- 0.003 vs. time. All results are of the final iteration. The red line on the first two graphs denotes the limiting

threshold. 0 100 200 300 400 500 600 700 800 900 -20 -10 0 10 20 d P re a m p t 0 100 200 300 400 500 600 700 800 900 -40 -20 0 20 40 u P o s ta m p t 0 100 200 300 400 500 600 700 800 900 -5 0 5 10 15x 10 -3 y O u tp u t t

(55)

47

As can be seen the signal is clipped above the threshold yet continues to function accurately once the spike has passed. The next additional function was the ability to rebuild the shape of the disturbance.

Figure 4.6(a): The left graph depicts the error of each iteration in blue with the final iteration in red vs. time; the right graph depicts the shape of the simulated disturbance vs. time with the dashed red line representing the deduced shape of the disturbance; the lower graph is the final correction signal.

0 100 200 300 400 500 600 700 800 900 -10 -8 -6 -4 -2 0 2 4 6 8x 10 -3 ej t 0 100 200 300 400 500 600 700 800 900 -0.5 0 0.5 1 1.5 2 2.5 vd t 0 100 200 300 400 500 600 700 800 900 -2 -1.5 -1 -0.5 0 0.5 1 1.5 wj t

(56)

48

Figure 4.6(b): The left graph depicts the error of each iteration in blue with the fin al iteration in red vs. time; the right graph depicts the shape of the simulated disturbance vs. time with the dashed red line representing the deduced shape of the disturbance; the lower graph is the final correction signal.

0 100 200 300 400 500 600 700 800 900 -10 -8 -6 -4 -2 0 2 4x 10 -3 ej t 0 100 200 300 400 500 600 700 800 900 0 0.5 1 1.5 2 2.5 vd t 0 100 200 300 400 500 600 700 800 900 -1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 wj t

(57)

49

Figure 4.6(c): The left graph depicts the error of each iteration in blue with the final iteration in red vs. time; the right graph depicts the shape of the simulated disturbance vs. time with the dashed red line representing the deduced shape of the disturbance; the lower graph is the final correction signal.

0 100 200 300 400 500 600 700 800 900 -10 -8 -6 -4 -2 0 2 4 6 8x 10 -3 ej t 0 100 200 300 400 500 600 700 800 900 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 vd t 0 100 200 300 400 500 600 700 800 900 -2 -1.5 -1 -0.5 0 0.5 1 wj t

(58)

50

Figure 4.6(d): The left graph depicts the error of each iteration in blue with the final iteration in red vs. time; the right graph depicts the shape of the simulated disturbance vs. time with the dashed red line representing the deduced shape of the disturbance; the lower graph is the final correction signal.

The following graphs demonstrate the disturbance deduction capability as well as the different types of disturbances the ILC system has been tested for.

0 100 200 300 400 500 600 700 800 900 -0.02 -0.015 -0.01 -0.005 0 0.005 0.01 0.015 ej t 0 100 200 300 400 500 600 700 800 900 -2 -1 0 1 2 3 4 5 vd t 0 100 200 300 400 500 600 700 800 900 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 wj t

(59)

51

4.3 Suggested future development

A possible future development to improve the robustness and response of the code is to have a variable adaptive Q-filter so that it can provide a high bandwidth in the beginning for good response then transform to a lower bandwidth for stability and noise reduction in the later stages.

Another possibility is to have an intelligent auto tuner for the ILC variables, as the shorter the amount of iteration available the greater the corresponding gains must be in order to learn a correction signal within the given iterations while the smaller gains results in a slower but more accurate correction signal. Also the higher gain is the more likely for the ILC controller to become unstable in further iterations past the number of iterations it was tuned for. As such it may be beneficial start with a higher gain ratio and as the iterations progress the gain ratio is reduced so that the best of different tunings strategies can be incorporated. Perhaps even a way to switch back to fast learning mode if a large error is encountered can be incorporated.

As each shot in the RFP experiment is costly it may be possible to further shorten the iterations needed by taking the recorded PID correction signal from a past experimental shot, time shifting it back a fixed amount of time and copying it to the ILC correction signal memory bank. This would mean the ILC correction is starting not from an empty array but a less accurate PID correction that should reduce the iterations needed to achieve a perfect repeatable disturbance correction.

Ultimately the purpose of this thesis is to study the viability to enact an ILC system in the EXTRAP T2R. As it has shown to be effective here the next step would be an evaluation of the MATLAB code and rewrite it in whatever language the control system of the EXTRAP T2R uses and be put into operation.

(60)

52

Chapter 5

Conclusion

The ILC system has shown to be a robust, efficient and capable of greatly increasing the accuracy of the Resistive Wall Mode Active Controller tracking as compared to the existing PID feedback controller alone. It would be beneficial to implement this system for the proposed use but there may yet be other benefits of its use; the distortion signal rebuild module may give some useful insight into the physical design characteristics of the RFP reactor as well as there may be other unknown repeatable disturbances during operation that would be automatically handled by a ILC system and may increase the overall stability of the reactor. Having demonstrated its capabilities to compensate for the disturbance the next goal will be likely optimizing its function so as to reduce the number of iterations needed to a minimum, as each cycle is a costly process in the RFP experiment, some suggestion to accomplish this can be seen in the previous section.

(61)

53

Appendix A

MATLAB code

function [Yj,Ej,Wj] = rfploopsimMOD(DistType, N_ilc, ilcparms)

% function [Yj,Ej,Wj] = rfploopsimMOD(DistType, N_ilc, ilcparms) % Test of ILC procedure for SISO cartoon RFP feedback-feedforward % simulink model "rfploopsim1v2.mdl"

% Standard values if input is null

ilc_kp = 5; % ILC Propotional value

ilc_kd = 5; % ILC Derivative value

ilc_qw = 0.8; % Q-filter cutoff low-pass

ilc_qn = 2; % Order of filter

DisturbanceType = 3; % Standard disturbance type % Taking in the input values

if nargin == 0

N_ilc=10; % If null input value set for 10 iterations

elseif nargin == 3 DisturbanceType = DistType; ilc_kp=ilcparms(1); ilc_kd=ilcparms(2); ilc_qw=ilcparms(3); end

% Setup for running simulink model "rfploopsim1v2.mdl" in local function scope

s = tf('s');

Ts = 100e-6; % Sample time of the real experimental data & control % Filter Fr

Fr = ss(0,0,0,1); % Null system does not affect signal % PID Fe kp = 40; ki = 5000; kd = 0.04; N = 30; Fe =+ (kp+ki/s+kd*s/(kd*s/N+1)); Fe = ss(Fe);

% Now Fr.{a,b,c,d} are state space matrices %(see block Fe in model how they are assigned) % Actuator Fd

tau2 = 1.1e-3; K = 4.1;

References

Related documents

In particular, we leverage the technique of block operator matrix representation of Fredholm valued operator functions and prove that the convergence rate for the inexact

Härtill kommer vidare, att d:r de Brun utgår från ett, så vitt jag förstår, kulturhistoriskt fullkomligt barockt antagande, nämligen att alla eller några av dessa viktsystem

This is valid for identication of discrete-time models as well as continuous-time models. The usual assumptions on the input signal are i) it is band-limited, ii) it is

This thesis is primarily based on the paper Thinking Fast and Slow with Deep Learning and Tree Search wherein Anthony, Tian, and Barber [3] present both the framework Expert

In this thesis we have considered three different market graphs; one solely based on stock returns, another one based on stock returns with vertices weighted with

The judicial system consists of three different types of courts: the ordinary courts (the district courts, the courts of appeal and the Supreme Court), the general

In our main result (Proposition 1) we show that as long as delegated blockholders are su¢ ciently ‡ow-motivated, and as long as good and bad funds are su¢ ciently di¤erent (so

Detta innebär att programmet ska fungera innehållsmässigt; längd, år, format, form och till viss del tematiskt och samtidigt gå att titta på för en publik som inte är där för