FC Coding is One step from 1st Principles to Solution!

Increased Productivity Example #6

Voice Coil Motor (VCM)^{[1]}

A Voice Coil Motor is basically an electromagnetic transducer in which a coil placed in a magnetic pole gap experiences a force proportional to the current passing through the coil. Voice Coil Motor can be generally classified as a dc brush less motor if the coil is wound as the starter and the permanent magnet with the attached payload is allowed to move or rotate. For rotary applications, a number of types of limited travel & brush less motors are available on the market, possessing flat torque output over a region of ±20°. By providing the necessary encoding and electronics, these motors are also used as constant speed motors.

Assuming the force generated is independent of position, the governing equation can be written as
L * di/dt + R i = E - φ v
dv/dt = φ i / J v = dx/dt

where
L = inductance of the motor coil (henry);
i = current intensity through the motor coil (ampere);
R = resistance of the motor coil (ohm);
E = applied voltage to the coil (volt);
φ = transducer constant; for linear motion, its units are either
Newton/ampere or volt/meter/second, and for rotary motion, the units
are N-m/A or volt/radians/second;
v = velocity of motion (radians/second or meter/second);
J = total inertia of the motor and access mechanism (kg - m2 or kg);
x = response (radians or meter).

The Voice Coil Motor design objective is to move from point A to B in the shortest time possible.

A physical constraint may exist to limit R / φ**2 to a constant +/- a tolerance. H1 & H2 in attached code show how such a constraint may be handled. R and φ will be varied in order to find a minimal seek time, Total_t, while meeting this physical constraint.

A DC brush less motor is to be used whose coilhas an inductance of .015 H in the presence of the permanent magnet. The supply voltage is 24 V, and there is a drop of about 1 V in the electronics before the motor winding. To reduce the thermal gradient, the maximum current should be limited to 0.5 A. Obtain the voltage transition times (τ _{i}), plus the torque sensitivity (φ) of the dc motor and the resistance (R) of the coil to meet the design objectives.

Increased ProductivityExample
#6Source Code:

1. Theoretical Problem/Solution ... Zero time for
change in polarity

Problem Seektime [Voice Coil Motor For An Actuator; Objective = Move from Point A to B in desired time (Tf)] Allot Tau(3) R = 50 Emax = 23 L = .015 [Ohms, Volts, Henry] Phi = .5 J = 5e-4 [Volts * Sec./Rad., Kg * M * M * Ohm] C = 0 V = 0 X = 0 [Initial Values] T = 0 Dt = .001 Tf = .072 [Time In Seconds] Tau(1) = .3*Tf Tau(2) =.4*Tf Tau(3) = .1*Tf Tmech = .12 Tm_tol = .05 [Mechanical Time constant & % tolerance] Pi = 4*Atan(1.) Xfinal = Pi / 6 [radians = 30 degrees of travel] Call Actuator End Model Actuator Find Tau In Bangbang By Ajax( Cntl2) To Match Err_pos, Err_vel End Controller Cntl2( Ajax) Damp = .0002 End Model Bangbang T = 0 C = 0 V = 0 X = 0 Tp = 0 [ Initial Values] For I = 1 to 3 Do Total_t = Tp + Tau( i) Dt = Tau( i)/100 Dp = 5 * Dt Tp = Tp + Dp Initiate Isis For VCMotor Equations Cdot/C, Vdot/V, Xdot/X of T Step Dt To Tp Polarity = -(-1)**I E = Emax * Polarity Do While (Tp .le. Total_t) then Tp = Tp + Dp Integrate VCMotor By Isis Print T, V, Vdot End Do Repeat Err_pos = Xfinal - X Err_vel = V End Model VCMotor Vdot = Phi * C / J Xdot = V Cdot = (E - Phi * V - R * C) / L End

2. Theoretical Problem/Solution ... Zero time for
change in polarity
New objective: Minimize Seek Time

Problem Seektime [Voice Coil Motor For An Actuator Objective = Minimize Seek Time] Allot Tau(3) R = 50 Emax = 23 L = .015 [Ohms, Volts, Henry] o o (same code as in example 1) o Pi = 4*Atan(1.) Xfinal = Pi / 6 [radians = 30 degrees of travel] Find Phi, R In Actuator By Jupiter( Cntl1) Holding H1, H2, Hc To Minimize Total_t End Model Actuator H1 = - R * J + Tmech * (1+Tm_tol) * Phi**2 [H1 & H2 must be >= 0] H2 = R * J - Tmech * (1-Tm_tol) * Phi**2 Find Tau In Bangbang By Ajax( Cntl2) To Match Err_pos, Err_vel End Controller Cntl1( Hera) Adjust = 2 End Controller Cntl2( Ajax) Summary = 0 End Model Bangbang T = 0 C = 0 V = 0 X = 0 Tp = 0 [ Initial Values] For I = 1 to 3 Do Total_t = Tp + Tau( i) Dt = Tau( i)/100 Dp = 5 * Dt Tp = Tp + Dp Initiate Isis For VCMotor Equations Cdot/C, Vdot/V, Xdot/X of T Step Dt To Tp Polarity = -(-1)**I E = Emax * Polarity Do While (Tp .le. Total_t) then Tp = Tp + Dp Integrate VCMotor By Isis Print T, V, Vdot End Do Repeat Terminate VCMotor Err_pos = Xfinal - X Err_vel = V End Model VCMotor Vdot = Phi * C / J Xdot = V Cdot = (E - Phi * V - R * C) / L Hc = .5 - C [ Hc must be >= 0] End

3. Practical Problem/Solution ... ArcTan() used to
change polarity

Problem Seektime [Voice Coil Motor For An Actuator Objective = Minimize Seek Time with constraint on rise/fall times; ie. |Edot| < Emax_slope] Allot Tau(3) o o (same code as in example 1) o Pi = 4*Atan(1.) Xfinal = Pi / 6 [radians = 30 degrees of travel] Ypeak = .985 * Pi/2 Xmax = Tan( Ypeak) Trise = 5*Tf/100 Pw50 = Trise Tends = .6*Trise Find Phi, R In Actuator By Jupiter( Cntl1) Holding H1, H2, Hc To Minimize Total_t End o o (same code as in example 2) o Model VCMotor Vdot = Phi * C / J Xdot = V Call Risetime [ E = constant except during transition times] Cdot = (E - Phi * V - R * C) / L Hc = .5 - C [ Hc must be >= 0] End Model Risetime If( I .Eq. 1) then [ Calculate E during transition time] If( T .lt. Tends ) then [ ie. E = f(t) during rise/fall times] E = (Atan((4*T/Pw50 - 1.)*Xmax) / Ypeak + 1.)/2. Endif Else If( I .eq. 2) then If( T-Xtau(1) .lt. Trise) then [Switch voltage polarity] Tt = T - Xtau(1) E = - Atan((2*Tt/Pw50 - 1.)*Xmax) / Ypeak Endif Else If( I .eq. 3) then If( T-Xtau(1)-Xtau(2) .lt. Trise) then [Switch voltage polarity] Tt = T-Xtau(1)-Xtau(2) E = Atan((2*Tt/Pw50 - 1.)*Xmax) / Ypeak Else If( Time-T .lt. Tends) then [Drop voltage to zero] Tt = T-Time+Tends E = - (Atan((4*Tt/Pw50 - 1.)*Xmax) / Ypeak-1.)/2 Endif Endif End

Applied Voltage waveforms to Coil

Figure 1. Theoretical Problem/Solution
... Zero time for change in polarity
Objective: Specific time (Tf) for movement; i.e. Total_t must equal Tf.

Figure 2. Theoretical Problem/Solution
... Zero time for change in polarity
Objective: Minimize Seek Time (Total_t)

Figure 3. Practical Problem/Solution
... ArcTan( ) used to change polarity
Objective: Minimize Seek Time while constraining rise/fall time.

This Voice Coil Motor problem is another increased productivity example do to using Calculus (level) programming.

^{[1]}Ananthanarayanan, K. S., Third-Order Theory and Bang-Bang Control of Voice Coil Actuators, IEEE Trans. on Magnetics, Vol. MAG-18, No. 3, May 1, 1982, pp. 888-892.