instructions for the rod magnet july 6, 2015stephen brooks, cbeta project1 updated to include...

10
Instructions for the Rod Magnet July 6, 2015 Stephen Brooks, Cbeta project 1 Updated to include source-only field model

Upload: luke-harmon

Post on 13-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Instructions for the Rod Magnet July 6, 2015Stephen Brooks, Cbeta project1 Updated to include source-only field model

Instructions for the Rod Magnet

July 6, 2015 Stephen Brooks, Cbeta project 1

Updated to include source-only field model

Page 2: Instructions for the Rod Magnet July 6, 2015Stephen Brooks, Cbeta project1 Updated to include source-only field model

Field of a =1 Rod with Constant M

• Linear potential within rod and 1/r outside• So constant B within rod and 1/r2 outside• Actually identical to cos() SC dipole

July 6, 2015 Stephen Brooks, Cbeta project 2

double potf(const double x,const double y,const double r){ double rr=(x*x+y*y)/(r*r); //if (rr>=1) return x/rr; else return x; if (rr>=1) return y/rr; else return y;}

V2 fieldf(const double x,const double y,const double r){ // (d/dx,d/dy) of potf double rr=(x*x+y*y)/(r*r); if (rr>=1) return V2_new(x*x-y*y,2*x*y)/(rr*rr*r*r); else return V2_new(1,0);}

These functions give the 2D potential and B field for a rod whose centre is at (x,y)=(0,0), has radius r and has magnetisation M=(1,0) T.

Rotate and scale for M as needed.Br=|M| (I use 1.11T±10%)In the =1 model these may be summed over all rods.

Page 3: Instructions for the Rod Magnet July 6, 2015Stephen Brooks, Cbeta project1 Updated to include source-only field model

Avoiding Demagnetising Settings

• The definition of the H field is:– H = (1/)B – M

• In our =1 model, this reduces to H = B – M • This quantity can be calculated around the

perimeter of each rod and checked against the demagnetisation B-H curve of the material

• The Halbach arrangements should be favourable

July 6, 2015 Stephen Brooks, Cbeta project 3

Page 4: Instructions for the Rod Magnet July 6, 2015Stephen Brooks, Cbeta project1 Updated to include source-only field model

Theoretical Optimisation Method

• In my program, the response matrix dBi/dn is first calculated using small finite differences– Bi are the field components measured by probes

– n are the angles of the rods

• A good method is to use multi-variable Newton iteration modified to use a smoothed inverse using the SVD of the response matrix– See http://stephenbrooks.org/ap/report/2015-3/svdboundedsolve.pdf

– You also want to use a line search + tuning of July 6, 2015 Stephen Brooks, Cbeta project 4

Page 5: Instructions for the Rod Magnet July 6, 2015Stephen Brooks, Cbeta project1 Updated to include source-only field model

Fast Field Model even with Iron

• If r at each point is constant (no saturated iron), the B field equations are linear in M

• B = rods n Brn(Bnx cos n + Bny sin n)– …where Bnx, Bny are pre-calculated FEM fields for

having only rod n magnetised by M=(1,0)T and (0,1)T respectively, other rods M=0

– Brn is the remnant field magnitude in rod n

– n is the angle of rod n

• Also works for 2 magnets with interfering ironJuly 6, 2015 Stephen Brooks, Cbeta project 5

Page 6: Instructions for the Rod Magnet July 6, 2015Stephen Brooks, Cbeta project1 Updated to include source-only field model

Required Setup

• Measurement: card of 10-20 Hall probes, or rotating coil aligned to magnet survey point

• Movement: stepper motor drivers to rotate each rod by known angles, probably requires gearing down to get mrad type accuracy– Also “brake” to clamp rods in place once done

• Control algorithm: computer program that can both read the field measurements and control the motors automatically

July 6, 2015 Stephen Brooks, Cbeta project 6

Page 7: Instructions for the Rod Magnet July 6, 2015Stephen Brooks, Cbeta project1 Updated to include source-only field model

Determining Initial Rod Angles

• Rotate rod n by (to n+) measure field B+

• Rotate back by -2 (to n-) measure field B-

• Rotate by to return to original position n

• From the formula on the last page,• B+-B- = Brn[Bnx(cos(n+)-cos(n-)) + Bny(sin(n+)-

sin(n-))]

• = (2 sin )[Bnx(-Brn sin n)+Bny(Brn cos n)]

• Solve for -Brn sin n and Brn cos n, giving Brn, n

July 6, 2015 Stephen Brooks, Cbeta project 7

Page 8: Instructions for the Rod Magnet July 6, 2015Stephen Brooks, Cbeta project1 Updated to include source-only field model

Use of Model for Correction

• Early concept was to determine local response matrix by small rod rotations each iteration– This was rather susceptible to noise as it involves

differentiation between measured signals

• Instead, given approximate knowledge of Brn,

n the model can calculate rotations to cancel the measured error by ensuring

• Bmodel,rotated - Bmodel,now ~= Bgoal - Bmeasured

July 6, 2015 Stephen Brooks, Cbeta project 8

Page 9: Instructions for the Rod Magnet July 6, 2015Stephen Brooks, Cbeta project1 Updated to include source-only field model

Accuracy of Model

• If |n,model-n| ≤ and |Brn,model-Brn| ≤

• |Bmodel-B| ≤ rods n (+Brn)(|Bnx|+|Bny|)

• To first order Brn can be replaced by Brn,model

• More important is accuracy of small changes• |dBmodel/dn - dB/dn| ≤ (+Brn)(|Bnx|+|Bny|)

• May run into problems when d/d is small?– Late stage optimisation often does comparatively

large movements with very small effectsJuly 6, 2015 Stephen Brooks, Cbeta project 9

Page 10: Instructions for the Rod Magnet July 6, 2015Stephen Brooks, Cbeta project1 Updated to include source-only field model

Iterative Correction Convergence

• If the following condition is met for f<1: • |Bmodel-B| ≤ f|Bmodel|

• …the error should reduce by at least a factor f each time the model’s correction is applied– Excluding errors uncorrectable even in the model

• This isn’t true when Bmodel is almost zero but B isn’t, as could happen in late optimisation– Could use new data to refit model Brn and initial n

• Linear problem in [Brn cos n,Brn sin n] [Bmeasured]

July 6, 2015 Stephen Brooks, Cbeta project 10