Steve Rogers Bio
• PhD in ME (control theory) from Kansas State University. 20 years control algorithm analysis/design, including classical and modern design, proportional integral derivative (PID), model reference adaptive, model predictive control (MPC), internal model control (IMC), dynamic modeling, state estimation, and filtering. • Control applications include: • Classical control design and analysis of aircraft bleed system pressure and temperature regulation using bode and time domain analyses. • Wind turbine power generator blade pitch angle control. • Algorithms for state estimation, autopilot control, and guidance on a small UAV. Objective was to fly a small hobbyist plane to designated GPS waypoints and circle. • Space Station control algorithms for the internal thermal control system for temperature, flow, and pressure feedback control loops. • Small brushless motor rpm control.
Flux Axis Control of Motor Abstract • Vector control, also called field-oriented control (FOC), is a variable-frequency drive (VFD) control method. • FOC is used to control the AC synchronous and induction motors. It was originally developed for high-performance motor applications that are required to operate smoothly over the full speed range, generate full torque at zero speed, and have high dynamic performance including fast acceleration and deceleration. • However, it is becoming increasingly attractive for lower performance applications as well due to FOC's motor size, cost and power consumption reduction superiority. • It is expected that with increasing computational power of the microprocessors it will eventually nearly universally displace single-variable scalar volts-per-Hertz (V/f) control. • This presentation will discuss: • overview of FOC, • System Identification, • PID design using Internal Model Control, • control enhancement for disturbance attenuation. Source of FOC description: https://en.wikipedia.org/wiki/Vector_control_(motor)
Field Oriented Control Agenda • Introduction to Field Oriented Control (FOC) • FOC Schematic • Vector Transformations • Proof of Concept Description • Simulink motor model • FOC flux (ID) axis inner loop • Torque load step disturbance and sinusoidal disturbance
• System Identification and simple model derivation • Internal Model Control PID gain derivation • Results for disturbances with PID • Harmonic Cancellation and disturbance accommodating control (DAC) • Results for disturbances with DAC add-on • Summary
Field Oriented Control Introduction • Vector control, also called field-oriented control (FOC), is a variable-frequency drive (VFD) control method where the stator currents of a three-phase AC electric motor are identified as two orthogonal components that can be visualized with a vector. • This control is based on projections which transform a three phase time and speed dependent system into a two co-ordinate (d and q co-ordinates) time invariant system. • Field oriented controlled machines need two constants as input references: the torque component (aligned with the q co-ordinate) and the flux component (aligned with d co-ordinate). • There are two FOC methods, direct or feedback vector control (DFOC) and indirect or feedforward vector control (IFOC).
Field Oriented Control Process Overview -1 1. Motor Stator phase currents are measured, converted to complex space vector in (a,b,c or 3 phase motor) coordinate system. 2. Current vector is converted to (α-β) coordinate system. Transformed to a coordinate system rotating in rotor reference frame, rotor position being derived by integrating the speed by means of speed measurement sensor or inferred by observer. 3. Rotor flux linkage vector is estimated by multiplying the stator current vector with motor parameters and low pass filtering the result. 4. Current vector is converted to (d,q) coordinate system. 5. d-axis component of the stator current vector is used to control the rotor flux linkage and the q-axis component is used to control the motor torque. Proportional integral (PI) controllers are typically used to control the d and q-axes currents. Forward transforms
a,b,c α-β d,q to PI control
Field Oriented Control Process Overview - 2 6. Disturbance mitigation enhancements. Degradations in controller performance may be caused by cross coupling, big and rapid changes in speed, current, torque loadings, and flux linkage variations. 7. Voltage components are transformed from (d,q) coordinate system to (α-β) coordinate system. 8. Voltage components are transformed from (α-β ) coordinate system to (a,b,c) coordinate system or fed into Pulse Width Modulation (PWM) modulator, or both, for signaling to the power inverter section.
Inverse transforms
PI control to d,q α-β a,b,c
Field Oriented Control Agenda • Introduction to Field Oriented Control (FOC) • FOC Schematic • Vector Transformations • Proof of Concept Description • Simulink motor model • FOC ID (flux) axis inner loop • Torque load step disturbance and sinusoidal disturbance
• System Identification and simple model derivation • Internal Model Control PID gain derivation • Results for disturbances with PID • Harmonic Cancellation and disturbance accommodating control (DAC) • Results for disturbances with DAC add-on • Summary
Basic Schematic of Inner Loop FOC for AC-motor - 1 • • • • • • •
PI (proportional integral that is most commonly used) is symbolic of a controller Note that only the inner loop, which is multi-loop, is shown. Outer loop is dedicated to the specific application, but is generally speed control. With FOC it becomes possible to control, directly and separately, the torque and flux of AC machines. Two motor phase currents are measured. These measurements feed the Clarke transformation module. The outputs of this projection are designated I. These two components of the current are the inputs of the Park transformation that gives the current in the d,q rotating reference frame. The Id and Iq components are compared to the references I Sdref (the flux reference) and I Sqref (the torque reference).
Basic Schematic of FOC for AC-motor - 2 • This control architecture can be used to regulate either synchronous or induction machines by simply changing the flux reference (d axis) and obtaining rotor flux position. When controlling a PMSM, the Id set point is set to zero. • The torque command I Sqref could be the output of the speed regulator when we use a speed FOC. The outputs of the current regulators are v Sqref and v Sdref; they are applied to the inverse Park transformation. • The outputs of this projection are a voltage vector which is the components of the stator vector voltage in the a, ß stationary orthogonal reference frame. These are the inputs of the Space Vector PWM. The outputs of this block are the signals that drive the inverter.
Basic Scheme of FOC for AC-motor Including the Outer Loop
• Outer loop is also commonly controlled with a PI controller. • This application requires speed control. • Data filtering is not shown, but will be application specific.
Field Oriented Control Agenda • Introduction to Field Oriented Control (FOC) • FOC Schematic • Vector Transformations • Proof of Concept Description • Simulink motor model • FOC ID (flux) axis inner loop • Torque load step disturbance and sinusoidal disturbance
• System Identification and simple model derivation • Internal Model Control PID gain derivation • Results for disturbances with PID • Harmonic Cancellation and disturbance accommodating control (DAC) • Results for disturbances with DAC add-on • Summary
Clarke Transformations Equations
• The Clarke Transforms converts the 3 phase amp signal to a rotating 2 axis. The simplified forward Clarke Transformation outputs (3 2) rotating components. It outputs a two co-ordinate time variant system.
a,b,c α-β
• The simplified inverse Clarke Transformation outputs (2 3) rotating components. It outputs a two coordinate time variant system.
α-β a,b,c
Source: https://www.eal.ei.tum.de/fileadmin/tueieal/www/courses/PE/tutorial/2013-2014-W/03-F-Space_Vector.pdf
Park Transformations (Orthogonal)
•
The simplified forward Park Transformation is (2 2) stationary components. The intent is for it to output from a time varying to a time invariant system (rotating to stationary). is the motor position.
α-β d,q
The simplified inverse Park Transformation is (2 2) stationary components. The intent is for it to output from a time invariant to a time varying system (stationary to rotating).
d,q α-β
Source: http://read.pudn.com/downloads169/sourcecode/embed/779893/Part%204%20Clark&Park.pdf
Field Oriented Control Agenda • Introduction to Field Oriented Control (FOC) • FOC Schematic • Vector Transformations • Proof of Concept Description • Simulink motor model • FOC ID (flux) axis inner loop • Torque load step disturbance and sinusoidal disturbance
• System Identification and simple model derivation • Internal Model Control PID gain derivation • Results for disturbances with PID • Harmonic Cancellation and disturbance accommodating control (DAC) • Results for disturbances with DAC add-on • Summary
Direct FOC Controller Proof of Concept • For complete motor development we must design for 3 loops: 1) d loop, 2) q loop, and 3) outer loop. • Use Microchip simulink model of a Permanent Magnet Synchronous Motor (PMSM) Hurst DMB0224C10002 as test bed. This is a publicly available free download from Microchip’s web site and is already set up for FOC. • Two basic concepts to check: 1. Basic PID controller development: 1) system ID and 2) PID design from simple models using internal model control (IMC) principles. 2. Add-on controller to PID for unknown torque load step and sinusoidal disturbance attenuation: develop disturbance accommodating control (DAC) transfer function.
Microchip Simulink Application Model
• Source: Microchip doc AN1770 • Freely available simulink download (google Microchip)
List of Microchip Simulink Blocks (doc AN1770)
Field Oriented Control Simulink Diagram Outer Loop Speed Controller
Outer Loop
Field flux (d) PID Inner Loop
DAC add-on for vibration attenuation
Torque or armature (q) PID
• In order to optimize the motor torque control the flux component (d) set point is fixed at 0. • The q component then regulates the torque to maintain a speed set point (2000) or a profile (if desired).
Simulink Showing Clarke & Park Transforms
Park Inverse Transform
Clarke Inverse Transform
Clarke Forward Transform
Motor Model
Park Forward Transform
Motor Model (Microchip doc AN1770) and Sinusoidal Disturbance Insertion
Electrical system equations
Damping coeff = 0.02-0.05
The mechanical model of the load includes the effects of these torques on the motor inertia.
Field Oriented Control Agenda • Introduction to Field Oriented Control (FOC) • FOC Schematic • Vector Transformations • Proof of Concept Description • Simulink motor model • FOC ID (flux) axis inner loop • Torque load step disturbance and sinusoidal disturbance
• System Identification and simple model derivation • Internal Model Control PID gain derivation • Results for disturbances with PID • Harmonic Cancellation and disturbance accommodating control (DAC) • Results for disturbances with DAC add-on • Summary
System ID of Microchip Model 2x2 Inner Loop fname = 'lin_HurstMDLmot_CL'; close_system(fname,1) open_system(fname) [a,b,c,d] = linmod(fname); figure(1) step(ss(a,b,c,d)),grid on
• • • •
figure(2) bodemag(ss(a,b,c,d)) • •
A simple approach is to use linmod applied to the inner loop. Modify downloaded simulink to cut the loops at dq input (controlled voltage) and dq output (measured amps). Note that the sinusoidal component is NOT included in the linmod model. Used ‘linmod’ to generate a 5 state model with the following eigenvalues: 0+ 0i 0+ 0i -438.04 + 206i -438.04 206i -876.09 + 0i The eigenvalues show 2 integrators, a fast pole, and 2 poles with a damping coefficient of 0.9. Generate and inspect step and bode plots.
System ID of Microchip Model – Inner Loop plots
D
Q
D
Q
• Used 5 state space model to generate step response and bode plots. • By inspection of the above step responses and bode plots d & q loops may be approximated with simple 1st order transfer functions. Not necessary to use 5 state space model. • k = 0.5;tc = .001;td = 0.0001; will approximate both models, where k is process gain, tc is time constant, and td is time delay. The simple models are shown below
D loop
Q loop
Field Oriented Control Agenda • Introduction to Field Oriented Control (FOC) • FOC Schematic • Vector Transformations • Proof of Concept Description • Simulink motor model • FOC ID (flux) axis inner loop • Torque load step disturbance and sinusoidal disturbance
• System Identification and simple model derivation • Internal Model Control PID gain derivation • Results for disturbances with PID • Harmonic Cancellation and disturbance accommodating control (DAC) • Results for disturbances with DAC add-on • Summary
Internal Model Control (IMC) Approach to PID Gain Selection - 1 General idea of IMC is to generate c(s) based on p(s) inversion. Â
,
Source: Brosilow & Joseph, Techniques of Model-Based Control, 2002, Prentice Hall
IMC Approach to PID Gain Selection - 2 IMC leads to controllers of the form:
Basic eqns
Source: Brosilow & Joseph, Techniques of Model-Based Control, 2002, Prentice Hall
IMC Approach to PID Gain Selection - 3
Key eqns
 Source: Brosilow & Joseph, Techniques of Model-Based Control, 2002, Prentice Hall
Please note:
IMC Approach to PID Gain Selection - 3 Matlab implementation of IMC equations for PID gains from simple 1st order model. % inner loop pid gains PIDid.kp = (2*tc + td)/k/(tc + td); PIDid.ki = 1/2*k/(tc + td); PIDid.kd = 2*tc*td/k/(tc + td);
k = 0.5;tc = .001;td = 0.0001;
PIDiq.kp = (2*tc + td)/k/(tc + td); PIDiq.ki = 1/2*k/(tc + td); PIDiq.kd = 2*tc*td/k/(tc + td);
IMC derived PID gains for ID & IQ loops: kp: 3.8182 ki: 227.27 kd: 0.00036364
k = 4;tc = .5;td = 0.1; % outer loop PIDrpm.kp = (2*tc + td)/k/(tc + td); PIDrpm.ki = 1/2*k/(tc + td); PIDrpm.kd = 2*tc*td/k/(tc + td);
IMC was derived for rpm loop using estimated plant parameters. Â
Source: Brosilow & Joseph, Techniques of Model-Based Control, 2002, Prentice Hall
Please note:
Field Oriented Control Agenda • Introduction to Field Oriented Control (FOC) • FOC Schematic • Vector Transformations • Proof of Concept Description • Simulink motor model • FOC ID (flux) axis inner loop • Torque load step disturbance and sinusoidal disturbance
• System Identification and simple model derivation • Internal Model Control PID gain derivation • Results for disturbances with PID • Harmonic Cancellation and disturbance accommodating control (DAC) • Results for disturbances with DAC add-on • Summary
Results of id Flux Loop IMC PID Tuning with Torque Load only • • • •
ID set point = 0 Only periodic torque load step changes provide disturbance. Sinusoidal component emulator is off. PID Controller
Following step disturbance IMC PID tracks well.
Results of id Flux Loop with Torque Load Step & Sinusoidal Disturbance • • •
Sinusoidal component emulator is on. PID controller is not able to handle oscillations therefore modification is needed. Consider controller modification to attenuate oscillations. • Can consider DAC add-on incorporating ideas from Harmonic Cancellation. • Harmonic Cancellation & DAC will be explained in the following sheets. • Harmonic Cancellation involves a bandpass filter add-on in separate controller channels. • Since we assume that sinusoidal frequency is in an unknown band we must look for an adaptive bandpass filter type of controller.
Field Oriented Control Agenda • Introduction to Field Oriented Control (FOC) • FOC Schematic • Vector Transformations • Proof of Concept Description • Simulink motor model • FOC ID (flux) axis inner loop • Torque load step disturbance and sinusoidal disturbance
• System Identification and simple model derivation • Internal Model Control PID gain derivation • Results for disturbances with PID • Harmonic Cancellation and disturbance accommodating control (DAC) • Results for disturbances with DAC add-on • Summary
Harmonic Cancellation Control Concept • Note that C(s) is an add-on component • C(s) does not change the PID, therefore can add to legacy controllers without modification. • If there are multiple disturbing frequencies C(s) may be repeated. • The algorithm for Cn(s) was given without guidance for the selection of gn or . A few variations were tested without success. So, it was not considered further at that time. Harmonic cancellation requires knowledge of sinusoidal disturbance frequency, which may not be available. • The idea is expressed based on the equation for disturbance rejection error.
Source: http://www.aerotech.com/media/107855/HarmonicCancellation_ePrint.pdf
Disturbance Accommodating Control (DAC) Theory - 1 • DAC theory is based on the assumption that disturbances may be represented as continuous waveforms. That being the case, the disturbances may then be cast in a state space form and later converted to a transfer function. • This is not an unreasonable assumption considering the vibration modes of the typical flexible structure. The disturbance will enter the control system as a continuous sinusoidal waveform. • The disturbance representation will be used to estimate the disturbance states, which then may be used to offset the waveform disturbance in the control law. • The typical state space disturbance representation is: w(t ) = H (t ) z + L(t ) x dz = D(t ) z + M (t ) x + σ (t ) dt • where z is the state of the disturbance w. • Generally L and M are 0, since the plant state contributions are 0. • H is associated with the assumed form of the disturbance. • D reflects the waveform-mode patterns of the disturbance w. • σ is a random impulse sequence.
DAC Theory - 2 w(t ) = H (t ) z + L(t ) x dz = D(t ) z + M (t ) x + σ (t ) dt
• The above disturbance model may be used to describe disturbances in the following plant state space model. dx (t ) = A(t ) x(t ) + B(t )u (t ) + F (t ) w(t ) dt y (t ) = C (t ) x(t ) + E (t )u (t ) + G (t ) w(t )
where x is the state vector, u is the input vector, y is the measurement vector, and w is the disturbance vector. • A, B, F, C, E, and G are matrices of the appropriate size. • By incorporating the above state space formulations we can derive a composite system. •
0 d x A + FL FH x B = + u + D z 0 dt z M σ x y = [ C + GL GH ] + Eu z
• E = 0 = L = M is usually the case, and then the composite system becomes:
0 d x A FH x B = + u + σ dt z 0 D z 0 x y = [ C GH ] z
DAC State Space Observer and DAC Control Laws • An observer is designed because the disturbance states and possibly some of the other states are not measurable. The state space form of the observer may be written as
xˆ d xˆ A FH xˆ B [ ] = + u + L 1 y − C GH zˆ dt zˆ 0 D zˆ 0 The hats indicate estimate and L1 is a matrix of appropriate size selected to stabilize the error dynamics of the observer.
•
We may divide the control law into two parts: one by standard design (for example, PID or lqr) and the other selected to counter the disturbance estimate w.
•
u = us + uw
where us is from standard practice and uw selected to counter the disturbance as below.
•
Bu w = − Fwˆ = − FHzˆ dzˆ = Dzˆ, wˆ = Hzˆ dt
•
If we consider the disturbance to be a series of random steps we may write D and H as D = 0 and H = 1 or dzˆ dt
•
= 0, wˆ = 1zˆ
If we consider the disturbance as a series of ramps we have dzˆ = Dzˆ, wˆ = Hzˆ dt 0 1 D= , H = [1 0] 0 0
Field Oriented Control Agenda • Introduction to Field Oriented Control (FOC) • FOC Schematic • Vector Transformations • Proof of Concept Description • Simulink motor model • FOC ID (flux) axis inner loop • Torque load step disturbance and sinusoidal disturbance
• System Identification and simple model derivation • Internal Model Control PID gain derivation • Results for disturbances with PID • Harmonic Cancellation and disturbance accommodating control (DAC) • Results for disturbances with DAC add-on • Summary
Results of id Flux Loop IMC PID with DAC with step disturbance • • • • • •
DAC is on with PID Note DAC application similarity to Harmonic Cancellation scheme where bandpass filter is used to attenuate sinusoids.
ID set point = 0 Periodic torque load step changes provide disturbance. Sinusoidal component emulator is off. DAC is off, PID only DAC improves response to Disturbance in both spike (2/3) and settling time (from 50 to 5 ms). DAC adds offset. Can we live with this?
Results of id Flux Loop with Step & Sinusoidal Disturbances
• •
Sinusoidal component emulator is on. DAC is off, PID only
• • • •
Sinusoidal component emulator is on. DAC is on with PID DAC attenuates oscillation, but still has offset. Spike is reduced and more consistent. Spike settling time is reduced from step disturbances.
ID axis Control Comparisons with Disturbances
• • • • •
DAC – yellow (turned off) PID - purple DAC+PID – blue PID tracks disturbances, but is less aggressive than DAC/PID. ID response is repeated below
• • • • •
DAC - yellow PID - purple DAC+PID – blue DAC tracks disturbances and tends to dominate PID for the sinusoid. ID response is repeated below
Field Oriented Control Agenda • Introduction to Field Oriented Control (FOC) • FOC Schematic • Vector Transformations • Proof of Concept Description • Simulink motor model • FOC ID (flux) axis inner loop • Torque load step disturbance and sinusoidal disturbance
• System Identification and simple model derivation • Internal Model Control PID gain derivation • Results for disturbances with PID • Harmonic Cancellation and disturbance accommodating control (DAC) • Results for disturbances with DAC add-on • Summary
Summary ID axis Control Comparisons with Various Sinusoidal Disturbances
% IMC inner loop pid gains PIDid.kp = (2*tc + td)/k/(tc + td); PIDid.ki = 1/2*k/(tc + td); PIDid.kd = 2*tc*td/k/(tc + td); PIDiq.kp = (2*tc + td)/k/(tc + td); PIDiq.ki = 1/2*k/(tc + td); PIDiq.kd = 2*tc*td/k/(tc + td); • •
PID+DAC step disturbance response is more consistent than PID alone. PID+DAC attenuates sinusoids better, but still has small offset.
42
Summary of Speed axis Control with Flexible Disturbance
•
• • •
Speed Axis performance is enhanced by the DAC add-on dramatically for both the step and sinusoidal disturbances. PID+DAC no longer has a slight offset. PID+DAC has more consistent step disturbance response. The Q axis has only the IMC derived PID algorithm.
% IMC outer speed loop pid gains k = 4;tc = .5;td = 0.1; % outer loop PIDrpm.kp = (2*tc + td)/k/(tc + td); PIDrpm.ki = 1/2*k/(tc + td); PIDrpm.kd = 2*tc*td/k/(tc + td);
ID axis Control Performance Index Comparisons & Comments
• Pin is performance index. • Field Oriented Control is possible with a simple IMC PID approach. • In the case of step and sinusoidal disturbance a DAC add-on can improve performance, although it produces an offset in the D loop. The integral term in the PID component may need to be increased. • The Q axis remained as a PID with no addons. • The outer speed loop showed improvement in all cases.