DOC PREVIEW
NMT EE 308 - Motor Control

This preview shows page 1-2-3-4 out of 11 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

EE 308 Spring 2011 • Preparation for Final Lab Project • Simple Motor Control Motor Control • A proportional–integral–derivative controller (PID controller) is a generic control loop feedback mechanism (controller) widely used in industrial control systems - A PID is the most commonly used feedback controller. - A PID controller calculates an "error" value as the difference between a measured process variable and a desired set point. The controller attempts to minimize the error by adjusting the process control inputs. • The PID controller calculation involves three separate constant parameters, and is accordingly sometimes called three-term control: 1) The proportional (P) 2) The integral (I) 3) The derivative values (D) • These values can be interpreted in terms of time: P depends on the present error, I on the accumulation of past errors, and D is a prediction of future errors, based on current rate of change. The weighted sum of these three actions is used to adjust the process via a control element such as the position of a control valve, the power supply of a heating element, or the supply voltage to a motor (to control acceleration, velocity, or position). Control Signal u(t)EE 308 Spring 2011 Kd and Ki constant Kp and Kd constant Kp and Ki constantEE 308 Spring 2011 Stability • If the PID controller parameters (the gains of the proportional, integral and derivative terms) are chosen incorrectly, the controlled process input can be unstable, i.e. its output diverges, with or without oscillation, and is limited only by saturation or mechanical breakage. Instability is caused by excess gain, particularly in the presence of significant lag. Generally, stability of response is required and the process must not oscillate for any combination of process conditions and setpoints, though sometimes marginal stability (bounded oscillation) is acceptable or desired. Optimum behavior • The optimum behavior on a process change or setpoint change varies depending on the application. • Two basic requirements are regulation (disturbance rejection – staying at a given setpoint) and command tracking (implementing setpoint changes) – these refer to how well the controlled variable tracks the desired value. • Specific criteria for command tracking include rise time and settling time. Some processes must not allow an overshoot of the process variable beyond the setpoint if, for example, this would be unsafe. Other processes must minimize the energy expended in reaching a new setpoint. - Rise time (tr): time for the output signal to go from 10% - 90 % of the step height (or any input signal). - Settling time (ts): time it takes for the signal to stabilize (be within 5%, 1%, or other). - Percent overshoot (PO): is the maximum value minus the step value divided by the step value. In the case of the unit step, the overshoot is just the maximum value of the step response minus one.EE 308 Spring 2011 • Consider a motor which has a maximum speed of 5000 RPM. The speed vs. duty cycle may look something like this: Negative and Positive Deadzones Need to use a real Speed vs. DC graph for homewokEE 308 Spring 2011 • The motor doesn’t start rotating until it is driven with a 10% duty cycle (??), after which it will increase speed linearly with the increase in duty cycle. • If the motor is initially stopped, and is then turned on (with 100% duty cycle), the speed vs. time might look something like this (the step response of the motor): • We will control the motor by adjusting the duty cycle with the MC9S12. We will do this by measuring the speed and updating the duty cycle on a regular basis. Let’s do the adjustments once every 8 ms. This means that we will adjust the duty cycle, wait for 8 ms to find the new speed, then adjust the duty cycle again. How much change in speed will there be in 8 ms? The motor behaves like a single time constant system, so the equation for the speed as a function of time is: S(t) = Sf + e−t/ττττ (Si − Sf ) where Si is the speed at time 0, Sf is the speed at time 1, and τ is the time constant of the system. With a duty cycle of D, the final speed will be: Sf = αDC + S0 where S0 is the speed the motor would turn with a 0% duty cycle if the speed continued linearly for duty cycles less than 10%, and α is the slope of the speed vs. duty cycle line (5000/0.9 in this example).EE 308 Spring 2011 • Here we assume that the time constant of the small motors we are using is about 1 second — i.e., it takes about 5 seconds (5 time constants) for the motor to go from a dead stop to full speed. If T = 8 ms, the motor will have changed its speed from Si to S(T) = Sf + e−T/ττττ (Si − Sf ) S(T) = (αDC + S0) + e−T/ττττ (Si – (αDC + S0) ) S(T) = (αDC + S0)(1 − e−T/ττττ)+ e−T/ττττ Si The speed at the nth cycle, S[n], will be S[n] = (αDC + S0)(1 − e−T/ττττ) + e−T/ττττ S[n − 1] • Consider an integral controller where the duty cycle is adjusted according to: D[n] = D[n − 1] + k(Sd − Sm[n]) We can simulate the motor response by iterating through these equations. Start with Sm[1] = 0, D[1] = 0, and Sd = 1500. Then we calculate: Sm[n] = (αD[n − 1] + S0)(1 − e−T/ττττ) + e−T/ττττ Sm[n − 1] D[n] = D[n − 1] + k(Sd − Sm[n]) In MATLAB we can simulate this as: alpha = 5000/0.9; % Max speed 5,000 RPM; turns on at 10% duty cycle Sd = 1500; % Desired Speed S0 = -alpha*0.1; % Speed motor would turn at 0% duty cycle if linear tau = 1; % One second time constant T = 8e-3; % Update rate is 8 ms k = 1e-7; % Constant for integral control Sm = 0; % Measured speed starts at 0 D = 0.1; % Duty cycle starts at 10% t = 0; ee = exp(-T/tau); % Precalculate this commonly used value for n=2:1000 % Make end value bigger if needed Sm(n)=(alpha*D(n-1) + S0)*(1-ee) + ee*Sm(n-1); D(n) = k*(Sd - Sm(n)) + D(n-1); t(n) = t(n-1)+T; end plot(t,Sm);EE 308 Spring 2011 • By changing the value of k we can see how this parameter affects the response. Here is the curve for k = 1.0 × 10−7: • With this value of k, it will take about 1 minute for the motor to get to the desired speed. • Here is the curve for k = 1.0 × 10-6:EE 308 Spring 2011 • Now it takes about 10 seconds to get to the desired speed, with a little bit of overshoot.


View Full Document

NMT EE 308 - Motor Control

Documents in this Course
Load more
Download Motor Control
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Motor Control and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Motor Control 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?